Re: PL/PgSQL buglet / doc error - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: PL/PgSQL buglet / doc error
Date
Msg-id 20021107155609.U3283-100000@megazone23.bigpanda.com
Whole thread Raw
In response to PL/PgSQL buglet / doc error  (Neil Conway <neilc@samurai.com>)
Responses Re: PL/PgSQL buglet / doc error
List pgsql-hackers
On 7 Nov 2002, Neil Conway wrote:

> The 7.3 docs for the PL/PgSQL return statement say:
>
>  RETURN with an expression is used to return from a PL/pgSQL function
>  that does not return a set.
>
> [...]
>
>  If you have declared the function to return void, then the expression
>  can be omitted, and will be ignored in any case.
...
> Should this be implemented, or should the assertion that 'RETURN is
> optional' be removed from the docs?

I'm not sure how you translated the above to return is optional.  I'd
read it as the expression portion of the return statement is optional if
the function returns void.  Thus you can say return; for the return
because the expression is optional.





pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: PL/PgSQL buglet / doc error
Next
From: Neil Conway
Date:
Subject: Re: PL/PgSQL buglet / doc error