Re: [SQL] Request for change in PL/PGSQL function handler

2001-01-26 Thread Josh Berkus
Tom, > Say what? > > regression=# create function foo(int) returns int as ' > regression'# begin > regression'# if $1 > 10 then return $1; > regression'# end if; > regression'# return $1 - 1; > regression'# end;' language 'plpgsql'; > CREATE Hmmm? When I've tried creating similar functio

Re: [SQL] Request for change in PL/PGSQL function handler

2001-01-26 Thread Tom Lane
Josh Berkus <[EMAIL PROTECTED]> writes: > Currently (7.0.3) the PLPGSQL function compiler permits only one RETURN > statment, at the end of the function. RETURN statements placed > elsewhere cause a compile error. Say what? regression=# create function foo(int) returns int as ' regression

[SQL] Request for change in PL/PGSQL function handler

2001-01-26 Thread Josh Berkus
Jan, Tom, etc: Currently (7.0.3) the PLPGSQL function compiler permits only one RETURN statment, at the end of the function. RETURN statements placed elsewhere cause a compile error. This, combined with the lack of an ELSEIF statement, has forced me into sometimes 7 levels of ne