Skip site navigation (1) Skip section navigation (2)

Re: PL/pgSQL Return statements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Donald Fraser" <postgres(at)kiwi-fraser(dot)net>
Cc: "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PL/pgSQL Return statements
Date: 2007-01-15 18:33:11
Message-ID: 18516.1168885991@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
"Donald Fraser" <postgres(at)kiwi-fraser(dot)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

In response to

pgsql-admin by date

Next:From: Hélder M. VieiraDate: 2007-01-15 23:48:10
Subject: Re: Pg_dump behaviour
Previous:From: Christopher BlandDate: 2007-01-15 18:27:02
Subject: Re: Invalid Checksum in Control File

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group