Re: How do BEGIN/COMMIT/ABORT operate in a nested SPI query?

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: How do BEGIN/COMMIT/ABORT operate in a nested SPI query?
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B5384109A@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: How do BEGIN/COMMIT/ABORT operate in a nested SPI query?  (<david@andl.org>)
Ответы Re: How do BEGIN/COMMIT/ABORT operate in a nested SPI query?
Re: How do BEGIN/COMMIT/ABORT operate in a nested SPI query?
Список pgsql-general
david@andl.org wrote:
> I am attempting to create a new language implementation. The language is Andl (andl.org), so the
> handler is plandl.
> This is a question about executing SPI queries from inside plandl.
> 
> The documentation makes it clear that SPI allows nested queries; that in some instances it will be
> necessary to call SPI_push() and SPI_pop(), but in others this will be handled automatically. Se
> http://www.postgresql.org/docs/9.5/interactive/spi-spi-push.html.
> 
> It is an important design feature of plandl to allow nested queries.
> 
> My question is: where are the transaction boundaries if the inner/outer query do or do not contain
> BEGIN/ABORT/COMMIT? Do they nest, or does an inner COMMIT finish a transaction started by an outer
> BEGIN, or is it ignored?

You cannot have BEGIN or COMMIT inside a function.

Yours,
Laurenz Albe

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Enhancement request for pg_dump
Следующее
От: Jinhua Luo
Дата:
Сообщение: Re: what's the exact command definition in read committed isolation level?