Transaction Handling in pl/pgsql

Поиск
Список
Период
Сортировка
От Craig Bryden
Тема Transaction Handling in pl/pgsql
Дата
Msg-id 000701c58706$3b24fb00$0200a8c0@amd2800
обсуждение исходный текст
Ответы Re: Transaction Handling in pl/pgsql  (Jaime Casanova <systemguards@gmail.com>)
Re: Transaction Handling in pl/pgsql  (Douglas McNaught <doug@mcnaught.org>)
Список pgsql-general
Hi

I am trying to get a better understanding of how transactions work in
pl/pgsql functions. I found the following text in the help:
"It is important not to confuse the use of BEGIN/END for grouping statements
in PL/pgSQL with the database commands for transaction control. PL/pgSQL's
BEGIN/END are only for grouping; they do not start or end a transaction"
but I am still a bit confused.

Suppose I have a function that will be called from an application. Will all
the statements in the function be rolled back if the last one generates an
exception? or do I need to add code to a function to make that happen?



Thanks
Craig


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

Предыдущее
От: Bjørn T Johansen
Дата:
Сообщение: Re: Windows version of PostgreSQL 8.x?
Следующее
От: David Pratt
Дата:
Сообщение: Re: Update more than one table