Re: [GENERAL] Transactions within a function body

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [GENERAL] Transactions within a function body
Дата
Msg-id 20081002154022.GD4151@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: [GENERAL] Transactions within a function body  ("Gurjeet Singh" <singh.gurjeet@gmail.com>)
Ответы Re: [GENERAL] Transactions within a function body  ("Bob Henkel" <bob.henkel@gmail.com>)
Список pgsql-hackers
Gurjeet Singh escribió:

> I have seen this feature being asked for, and this work-around suggested so
> many times. If plpgql does it internally, why not provide a clean interface
> for this? Is there some road-block, or that nobody has ever tried it?

Initially we aimed at just exposing SAVEPOINT and ROLLBACK TO in
functions, but ran into the problem that the SPI stack needs to be dealt
with appropriately and you can't do it if the user is able to modify it
arbitrarily by calling transaction-modifying commands.  That's when the
EXCEPTION idea came up.  We never went back and studied whether we could
have fixed the SPI limitation, but it's not trivial.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Block-level CRC checks
Следующее
От: "Bob Henkel"
Дата:
Сообщение: Re: [GENERAL] Transactions within a function body