Error in refactoring options

Dobromir

Member
When name of variable is the same as the name of table column in a select statement, refactoring->rename item (in program window) changes variable name and also name of the column. It should change only name of variable.
Example:
before refactoring:
procedure example is
abc integer
begin
select abc into abc
from my_table;
end;
after refactoring->rename item on abc variable:
procedure example is
xyz integer
begin
select xyz into xyz
from my_table;
end;
and should be (if abc is a column of my_table):
procedure example is
xyz integer
begin
select abc into xyz
from my_table;
end;
 
why would you have a variable with the same name as a column name?

just for ease of reading, shouldnt it be

Code:
begin
select abc
  into v_abc
  from my_table;
end;
 
I once shot myself in the foot with a variable with the same name as a table field.

It took way too long to figure out why the select wasn't using the variable value! WAY TOO LONG!
 
Back
Top