Re: PL/pgSQL nested CALL with transactions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PL/pgSQL nested CALL with transactions
Дата
Msg-id 27243.1521222563@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PL/pgSQL nested CALL with transactions  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: PL/pgSQL nested CALL with transactions
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2018-03-16 18:35 GMT+01:00 Peter Eisentraut <
> peter.eisentraut@2ndquadrant.com>:
>> Not very typical, but we apply the same execution context handling to
>> CALL and DO at the top level, so it would be weird not to propagate that.

> Although it is possible, I don't see any sense of introduction for DO into
> plpgsql. Looks like duplicate to EXECUTE.

Not sure what you think is being "introduced" here.  It already works just
like any other random SQL command:

regression=# do $$
regression$# begin
regression$#   raise notice 'outer';
regression$#   do $i$ begin raise notice 'inner'; end $i$;
regression$# end $$;
NOTICE:  outer
NOTICE:  inner
DO

While certainly that's a bit silly as-is, I think it could have practical
use if the inner DO invokes a different PL.

            regards, tom lane


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: PL/pgSQL nested CALL with transactions
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] Partition-wise aggregation/grouping