variable name RESULT in PLPGSQL does not work (PG7.1) - Mailing list pgsql-general

From Mirko Zeibig
Subject variable name RESULT in PLPGSQL does not work (PG7.1)
Date
Msg-id 20010110170228.A5604@picard.inka.de
Whole thread Raw
List pgsql-general
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



pgsql-general by date:

Previous
From: Jeff Eckermann
Date:
Subject: RE: converting .xls to delimited file
Next
From: "John Menke"
Date:
Subject: Performance Issues