Re: Extending PostgreSQL with a Domain-Specific Language (DSL) - Development

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Extending PostgreSQL with a Domain-Specific Language (DSL) - Development
Дата
Msg-id CAKFQuwZTu=J3gqQkbb+9+yhUgc5m_y1WtJA6cHEh-PdY8i3bHA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Extending PostgreSQL with a Domain-Specific Language (DSL) -Development  (Tom Mercha <mercha_t@hotmail.com>)
Ответы Re: Extending PostgreSQL with a Domain-Specific Language (DSL) -Development  (Tom Mercha <mercha_t@hotmail.com>)
Список pgsql-hackers
On Tue, Jul 9, 2019 at 5:23 PM Tom Mercha <mercha_t@hotmail.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).

David J.

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

Предыдущее
От: Tom Mercha
Дата:
Сообщение: Re: Extending PostgreSQL with a Domain-Specific Language (DSL) -Development
Следующее
От: Tom Mercha
Дата:
Сообщение: Re: Extending PostgreSQL with a Domain-Specific Language (DSL) -Development