Re: Transactions and Locks writing in PLPGSQL

Поиск
Список
Период
Сортировка
От tolik@aaanet.ru (Anatoly K. Lasareff)
Тема Re: Transactions and Locks writing in PLPGSQL
Дата
Msg-id 86elsnfw5h.fsf@tolikus.hq.aaanet.ru
обсуждение исходный текст
Ответ на Transactions and Locks writing in PLPGSQL  (Allan Kamau <hugebirdwings@yahoo.com>)
Список pgsql-admin
>>>>> "AK" == Allan Kamau <hugebirdwings@yahoo.com> writes:

 AK> Hi all,
 AK> How do I write transaction statements like 'BEGIN
 AK> WORK'... in PLPGSQL.
 AK> Also how do I write lock statements in the same.
 AK> Thank you in advance.

 AK> Allan Kamau

There is no possibility for this. See (from manual):

(3) You also cannot have transactions in PL/pgSQL procedures. The
entire function (and other functions called from
    therein) is executed in a transaction and PostgreSQL rolls back
the results if something goes wrong. Therefore
    only one BEGIN statement is allowed.

--
Anatoly K. Lasareff                 Email:    tolik@aaanet.ru
                             http://tolikus.hq.aaanet.ru:8080

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: High memory usage
Следующее
От: Sébastien HEITZMANN
Дата:
Сообщение: Re: Transactions and Locks writing in PLPGSQL