pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
PL/pgSQL Return statements 2+ messages / 2 participants [nested] [flat]
* PL/pgSQL Return statements @ 2007-01-15 17:13 Donald Fraser <postgres@kiwi-fraser.net> 2007-01-15 18:33 ` Re: PL/pgSQL Return statements Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: Donald Fraser @ 2007-01-15 17:13 UTC (permalink / raw) To: pgsql-admin Hello, I am currently trying to upgrade PostgreSQL from 8.0 to 8.1 on our development machine and have run into a problem with RETURN VOID; statements in PL/pgSQL functions that have a return type of void. I'm getting errors like the following: ERROR: RETURN cannot have a parameter in function returning void at or near "VOID" at character 2983. Does this mean I must edit every function that is declared with RETURNS VOID and remove the RETURN VOID; statement from the body? I did a pg_dumpall using the 8.1 libraries on the 8.0 database and this made no difference. Thanks in advance, regards Donald Fraser ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PL/pgSQL Return statements 2007-01-15 17:13 PL/pgSQL Return statements Donald Fraser <postgres@kiwi-fraser.net> @ 2007-01-15 18:33 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2007-01-15 18:33 UTC (permalink / raw) To: Donald Fraser <postgres@kiwi-fraser.net>; +Cc: pgsql-admin "Donald Fraser" <postgres@kiwi-fraser.net> writes: > I'm getting errors like the following: > ERROR: RETURN cannot have a parameter in function returning void at or = > near "VOID" at character 2983. > Does this mean I must edit every function that is declared with RETURNS = > VOID and remove the RETURN VOID; statement from the body? Yup. That was never correct code, but plpgsql used to completely ignore anything after RETURN in a function declared to return VOID. Which surprised enough people that we changed it ... regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-01-15 18:33 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2007-01-15 17:13 PL/pgSQL Return statements Donald Fraser <postgres@kiwi-fraser.net> 2007-01-15 18:33 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox