SETOF specification and default behavior (CREATE FUNCTION) - Mailing list pgsql-docs

From PG Doc comments form
Subject SETOF specification and default behavior (CREATE FUNCTION)
Date
Msg-id 162489463589.697.11530554063646944264@wrigleys.postgresql.org
Whole thread Raw
List pgsql-docs
The following documentation comment has been logged on the website:

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

It seems like an oversight that the synopsis for CREATE FUNCTION doesn't
actually show the modifier "SETOF" as a optional literal part of the syntax
but only describes it as a modifier to the data type identifier in the
"rettype" description.

Additionally, its unclear whether there is any other way to specify that a
function returns a set other than using RETURNS SETOF (which is otherwise an
optional clause since you can use OUT arguments instead).

Putting the two together, it is unclear whether writing only "RETURNS SETOF"
is allowed when using OUT arguments.  I'm pretty sure it is not due to the
"its a modifier" clause in the description.

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Document behaviour of failed sub queries
Next
From: "David G. Johnston"
Date:
Subject: Re: Document behaviour of failed sub queries