Re: return type marked optional but isn't

2024-02-21 Thread David G. Johnston
On Wed, Feb 21, 2024 at 10:10 AM PG Doc comments form <
nore...@postgresql.org> wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/13/sql-createfunction.html
> Description:
>
> the documentation for creating a function shows [ RETURNS rettype | RETURNS
> TABLE ( column_name column_type [, ...] ) ] but returns is not optional. At
> least when specifying LANGUAGE plpgsql. All the online advice suggests
> specifying RETURNS void as the solution.
>

As with most conditionally option things in the docs reading the
description for the item tells you when it can be omitted.

rettype: "When there are OUT or INOUT parameters, the RETURNS clause can be
omitted."

David J.


return type marked optional but isn't

2024-02-21 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/sql-createfunction.html
Description:

the documentation for creating a function shows [ RETURNS rettype | RETURNS
TABLE ( column_name column_type [, ...] ) ] but returns is not optional. At
least when specifying LANGUAGE plpgsql. All the online advice suggests
specifying RETURNS void as the solution.