From: | Tom Mercha <mercha_t(at)hotmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Extending PostgreSQL with a Domain-Specific Language (DSL) - Development |
Date: | 2019-07-10 00:43:56 |
Message-ID: | AM6PR04MB5544B53712F935CA49C95397F4F00@AM6PR04MB5544.eurprd04.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10/07/2019 02:31, David G. Johnston wrote:
> On Tue, Jul 9, 2019 at 5:23 PM Tom Mercha <mercha_t(at)hotmail(dot)com> wrote:
>
>>
>> I understand that you never wrote any PL handler but was just thinking
>> about this functionality as a follow-up to our conversation. I was just
>> wondering whether anonymous DO blocks *must* return void or not?
>>
>> The docs for DO say it is a function returning void -
>> https://www.postgresql.org/docs/current/sql-do.html
>
>
>
>>
>
> But the docs for CREATE LANGUAGE's INLINE HANDLER say 'typically return
>> void' - https://www.postgresql.org/docs/current/sql-createlanguage.html
>
>
> No, the language cannot override the SQL execution environment's
> limitations.
>
> "The code block is treated as though it were the body of a function with no
> parameters, returning void. It is parsed and executed a single time."
>
> The above applies regardless of the language the code block is written in.
>
> It can, however, affect permanent session state (so, use tables).
>
Thank you very much for addressing the question.
I am still a bit of a novice with PostgreSQL internals. Could you please
provide some more detail on your comment regarding affecting permanent
session state?
> David J.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2019-07-10 00:46:25 | coypu: "FATAL: sorry, too many clients already" |
Previous Message | David G. Johnston | 2019-07-10 00:31:45 | Re: Extending PostgreSQL with a Domain-Specific Language (DSL) - Development |