Re: transaction in plpgsql

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: transaction in plpgsql
Дата
Msg-id web-1560044@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на transaction in plpgsql  (Joseph Syjuco <joseph@asti.dost.gov.ph>)
Список pgsql-sql
Joe,

> how can i implement transactions inside my plpgsql functions 

You can't.

Each PL/pgSQL function is automatically treated as a single transaction
by Postgres.   As such, the entire function either succeeds or fails.

To manage a transaction *inside* the PL/pgSQL function, Postgres would
have to support nested transactions ... which we currently don't.Nested transactions and MVCC are somewhat of a tangle
toreconcile,
 
and we don't expect a solution until Postgres 8.0 (if then).

-Josh Berkus




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

Предыдущее
От: Joseph Syjuco
Дата:
Сообщение: transaction in plpgsql
Следующее
От: David BOURIAUD
Дата:
Сообщение: Re: graphical interface - admin