public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: David G. Johnston <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions
Date: Tue, 18 Jun 2024 15:04:17 -0400
Message-ID: <CANzqJaB_E-wZn3Z91amPN9KCAXfm7JKY08dnuVY2r9mWys-4Bg@mail.gmail.com> (raw)
In-Reply-To: <CAKFQuwa430SdD+fD34_hzCczf9Fv3AKR4Mds_KxPuonaFs7emQ@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>
	<CAKFQuwa430SdD+fD34_hzCczf9Fv3AKR4Mds_KxPuonaFs7emQ@mail.gmail.com>

On Tue, Jun 18, 2024 at 2:37 PM David G. Johnston <
[email protected]> wrote:

> 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.
>

"A function returns a value*, but a procedure does not."

*In the case of SQL, "value" might be a set.


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: <CANzqJaB_E-wZn3Z91amPN9KCAXfm7JKY08dnuVY2r9mWys-4Bg@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