Re: Transaction Handling in pl/pgsql?

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: Transaction Handling in pl/pgsql?
Дата
Msg-id 42D4A82B.6080803@commandprompt.com
обсуждение исходный текст
Ответ на Transaction Handling in pl/pgsql?  ("Nee.mem(倪明)" <neemem@atlas-china.com>)
Ответы Re: Transaction Handling in pl/pgsql?  (Neil Conway <neilc@samurai.com>)
Список pgsql-general
>>your_function adds some rows but the last one gives an error, because
>>all statements that are out of a transaction block are in its own
>>transaction the select calling your_function is inside a
>>transaction... so, the answer is yes... the statements inside the
>>function will be rolled back
>

Unless you are using savepoints in 8.x, any error you generate will
automatically cause the need to rollback.

If you are using savepoints you can rollback to a specific point of
a parent transaction.



Sincerely,

Joshua D. Drake


>
>
>
> How to use rollback  work in pl/pgsql functions.? Give an example
>
>
> ---------------------------(end of broadcast)---------------------------TIP 5: don't forget to increase your free
spacemap settings 


--
Your PostgreSQL solutions provider, Command Prompt, Inc.
24x7 support - 1.800.492.2240, programming, and consulting
Home of PostgreSQL Replicator, plPHP, plPerlNG and pgPHPToolkit
http://www.commandprompt.com / http://www.postgresql.org

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

Предыдущее
От: "Nee.mem(倪明)"
Дата:
Сообщение: Transaction Handling in pl/pgsql?
Следующее
От: "Nee.mem(倪明)"
Дата:
Сообщение: can you tell me how to use rollback work in 'pgsql' function? and give me a exsample?