Re: Transactions within a function body

Поиск
Список
Период
Сортировка
От Dennis Brakhane
Тема Re: Transactions within a function body
Дата
Msg-id 226a19190810011420j4dfe4a74oded00094895395be@mail.gmail.com
обсуждение исходный текст
Ответ на Transactions within a function body  (Reg Me Please <regmeplease@gmail.com>)
Ответы Re: Transactions within a function body  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
On Wed, Oct 1, 2008 at 5:54 PM, Reg Me Please <regmeplease@gmail.com> wrote:
> Hi all.
>
> Is there a way to have (sub)transactions within a function body?
> I'd like to execute some code (a transaction!) inside a function and later
> decide whether that transaction is to be committed or not.

You could issue a "SAVEPOINT name". If at the end you don't want your
changes to apply, you can issue a "ROLLBACK to name"

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

Предыдущее
От: Seb
Дата:
Сообщение: inserting only new rows from csv file
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: inserting only new rows from csv file