Hello everybody,
I converted some existing plpgsql-scripts from 7.0.3 to 7.1 (CVS from
2001-01-09) and had problems with a variable RESULT in my script. E.g.:
drop function bla(integer);
create function bla(integer) returns integer as '
declare
RESULT integer;
begin
RESULT:=$1;
return RESULT;
end;'
language 'plpgsql';
will result in:
test=> SELECT bla(4);
NOTICE: plpgsql: ERROR during compile of bla near line 2
ERROR: parse error at or near "RESULT"
whereas bla will work if I rename RESULT to RESLT. I did not find any
documentation about a special variable-name, but a quick grep through the
*.c-files did show some results in src/backend/nodes, RESULT seems to be
part of executor-"plans".
Maybe this behaviour should be documented :-).
Best Regards
Mirko