PL/SQL Beautifier and fetch into

Henk Jan

Member
I am using version 7.1, but the problem exits for some time.

The following PL/SQL statement is not correctly beautified:

Code:
begin
  open c(p_id);
  fetch c into rec;
  close c;
end;
is beautified into

Code:
begin
  open c(p_id);
  fetch c
    into rec;
  close c;
end;
As you can see the into part of the fetch statement is not aligned. Not to the left and not to right.
I set left align keywords within the DML tab.

Is there anyway I can align this construction correctly? The code should be:

Code:
begin
  open c(p_id);
  fetch c
  into  rec;
  close c;
end;
or

Code:
begin
  open c(p_id);
  fetch c
   into rec;
  close c;
end;
 
There is currently no option that controls this. I have added it to the list of enhancement requests though.
 
I'd like to second this request for control over the 'fetch into', though what I want is to be able to place it on one line.

( I see there are requests for this from way back in 2003, so I won't hold my breath :) )

Guttorm
 
Back
Top