Add example for the function with output parameters and RETURN NEXT with no expression

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема Add example for the function with output parameters and RETURN NEXT with no expression
Дата
Msg-id 175805851950.861.15380678776435988291@wrigleys.postgresql.org
обсуждение исходный текст
Список 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 по дате отправления: