Add example for the function with output parameters and RETURN NEXT with no expression - Mailing list pgsql-docs

From PG Doc comments form
Subject Add example for the function with output parameters and RETURN NEXT with no expression
Date
Msg-id 175805851950.861.15380678776435988291@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/17/plpgsql-control-structures.html
Description:

https://www.postgresql.org/docs/current/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING-RETURN-NEXT

> If you declared the function with output parameters, write just RETURN
NEXT with no expression. On each execution, the current values of the output
parameter variable(s) will be saved for eventual return as a row of the
result. Note that you must declare the function as returning SETOF record
when there are multiple output parameters, or SETOF sometype when there is
just one output parameter of type sometype, in order to create a
set-returning function with output parameters.

For me it is hard to imagine how to fill `OUT args` and then use `RETURN
NEXT` with no expression.
It would be nice if documentation have an example for that case.

Thank you.

pgsql-docs by date:

Previous
From: Eugen Konkov
Date:
Subject: Re: The document contains false statements
Next
From: Eugen Konkov
Date:
Subject: Re: The document contains false statements