Beautification of update with returning clause

Bo Pedersen

Member²
I'm not sure if this has been reported before, but the beautifier puts the returning clause in an update at the end of the line instead of on a new line:

update common.configuration t
set t.value = p_value
where t.system = p_system and t.type = p_type and p.name = p_name returning id into l_id;

It works correctly for an insert statement.

Bo Pedersen
 
I am using version 5.1.4.730.

The behaviour is the same whether I do it as SQL or PL/SQL. I have tried to change the DML beautifier options but none seems to have any influence on the returning clause. This include the default settings. It is still written at the end of the line instead of on a new line.

As mentioned, an insert works correctly, but delete also gives the same wrong result:

Code:
update common.properties p
   set p.name = 'aaddfd', p.value = 'kadfaldjdlddfdfsfkj df asdf adsf' returning id into l_id;

insert into common.properties
  (name, value)
values
  ('aaddfd', 'kadfaldjdlddfdfsfkj df asdf adsf')
returning id into l_id;

delete from common.properties p
 where p.name = 'aaddfd' and p.value = 'kadfaldjdlddfdfsfkj df asdf adsf' returning id into l_id;
It seems like the returning clause is not recognized correctly. In the following, the returning keyword is alligned with the value for p.value. The actual point of wrapping depends of course on the page size.

Code:
update common.properties p
   set p.name = 'aaddfd',
       p.value = 'kadfaldjdlddfdfsfkj df asdf adsfasdfdfsdfesdsdfddfsdfdfdfdsfdfasdfdfsdfsadfdsf'
                  returning id into l_id;
I am using the kwf files for multi-line strings.

Bo Pedersen
 
Back
Top