plpgsql function changes?

Started by David Lazaralmost 21 years ago2 messagesgeneral
Jump to latest
#1David Lazar
dlazar@resistorsoftware.com

Hi,

I run a function that returns a setof custom type rows against pgsql
7.4.6 and it works great. The same type and function was migrated to
pgsql 8.0.3 but fails to run, returning an error:

ERROR: RETURN cannot have a parameter in function returning set; use
RETURN NEXT at or near "pkg" at character 1149

where pkg is just a declared RECORD variable.

Did something change from pgsql 7.X series set returning function to
version 8.X series???

I am thinking no... and that maybe the migration of code using
pg_restore screwed something up... any tips??

Thanks!!

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: David Lazar (#1)
Re: plpgsql function changes?

David Lazar <dlazar@resistorsoftware.com> writes:

ERROR: RETURN cannot have a parameter in function returning set; use
RETURN NEXT at or near "pkg" at character 1149

Did something change from pgsql 7.X series set returning function to
version 8.X series???

I think 8.0 actually complains that you made a mistake, whereas 7.x
just silently ignores it. It's still a mistake though.

regards, tom lane