Re: Transaction in function problem

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Transaction in function problem
Дата
Msg-id 200305271148.50385.josh@agliodbs.com
обсуждение исходный текст
Ответ на Transaction in function problem  (Rory Campbell-Lange <rory@campbell-lange.net>)
Ответы Re: Transaction in function problem  (Rory Campbell-Lange <rory@campbell-lange.net>)
Список pgsql-novice
Rory,

> I don't appear to be able to use transactions in functions. Needless to
> say, transactions work in psql. The function below works if I take the
> TRANSACTION bits out. Help much appreciated!

That is correct.    Functions include an implied transaction in PostgreSQL,
unless they are part of a larger transaction.   Postgres does not currently
support "nested" transactions, so any attempt to use them inside a function
will fail.

It's on the "TODO" list.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


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

Предыдущее
От: "Chad Thompson"
Дата:
Сообщение: pg_dumpall and restore
Следующее
От: Rory Campbell-Lange
Дата:
Сообщение: Re: Transaction in function problem