Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
Дата
Msg-id 4184542.1718741065@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Tuesday, June 18, 2024, Ron Johnson <ronljohnsonjr@gmail.com> wrote:
>> What's the purpose?  Legacy of not having procedures?

> So people can have a style guide that says always specify a returns clause
> on function definitions.

To my mind, the reason we allow RETURNS together with OUT parameter(s)
is so there's a place to write SETOF if you want that.

Yes, the RETURNS TABLE syntax is somewhat redundant with RETURNS
SETOF.  Blame the SQL standard for that.

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: fail to install postgresql15 on Alma9
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Restore of a reference database kills the auto analyze processing.