Thread: SETOF specification and default behavior (CREATE FUNCTION)

SETOF specification and default behavior (CREATE FUNCTION)

From
PG Doc comments form
Date:
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.