public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Ron Johnson <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
Date: Tue, 18 Jun 2024 11:37:36 -0700
Message-ID: <CAKFQuwa430SdD+fD34_hzCczf9Fv3AKR4Mds_KxPuonaFs7emQ@mail.gmail.com> (raw)
In-Reply-To: <CANzqJaBy1Vwpo_fso+KKo_ubKaaA2etNkz-T5caCexQKQ5m9mg@mail.gmail.com>
References: <CACX+KaPBaSW+0PyMC7dmY6W9W8mPSbWpkJRhAOQOC9Qb0TjCQA@mail.gmail.com>
<CANzqJaA-Bmsq5npa1qCaQkDMb-4+9ZqZVUHqpVzURJ-RtSgS-w@mail.gmail.com>
<CAKFQuwarhk+tg0iJVekT8FENSjhTBXhvVmbep6kWVrUzd1naaA@mail.gmail.com>
<CANzqJaCWEJb8VXK=063GnE9VF71EAijXf_MCjHj48ooAyUw9bw@mail.gmail.com>
<CAKFQuwbBAks7=R0GDmSY91YGLp3_kt7nQ3_K_4u38GLz34NbLA@mail.gmail.com>
<CANzqJaBy1Vwpo_fso+KKo_ubKaaA2etNkz-T5caCexQKQ5m9mg@mail.gmail.com>
On Tuesday, June 18, 2024, Ron Johnson <[email protected]> wrote:
> On Tue, Jun 18, 2024 at 1:57 PM David G. Johnston <
> [email protected]> wrote:
>
>> On Tuesday, June 18, 2024, Ron Johnson <[email protected]> wrote:
>>
>>>
>>> But I stand by returning OUT params and records at the same time.
>>>
>>
>> You mean you dislike adding the optional returns clause when output
>> parameters exist?
>>
>
> Correct. It breaks the distinction between function and procedure.
>
How so?
The two distinctions are functions can produce sets while procedures get
transaction control.
They both can produce a single multi-column output record. The presence or
absence of the optional return clause on a function definition doesn’t
change that fact.
>
>
>> Because the out parameters and the “record” represent the exact same
>> thing.
>>
>
> 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.
David J.
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
In-Reply-To: <CAKFQuwa430SdD+fD34_hzCczf9Fv3AKR4Mds_KxPuonaFs7emQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox