Re: PL/pgSQL Return statements - Mailing list pgsql-admin

From Tom Lane
Subject Re: PL/pgSQL Return statements
Date
Msg-id 18516.1168885991@sss.pgh.pa.us
Whole thread Raw
In response to PL/pgSQL Return statements  ("Donald Fraser" <postgres@kiwi-fraser.net>)
List 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

pgsql-admin by date:

Previous
From: "Christopher Bland"
Date:
Subject: Re: Invalid Checksum in Control File
Next
From: Hélder M. Vieira
Date:
Subject: Re: Pg_dump behaviour