Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions - Mailing list pgsql-general

From Tom Lane
Subject Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
Date
Msg-id 4184542.1718741065@sss.pgh.pa.us
Whole thread Raw
In response to Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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 by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: fail to install postgresql15 on Alma9
Next
From: "Peter J. Holzer"
Date:
Subject: Re: Restore of a reference database kills the auto analyze processing.