Re: How to implement transaction in plpgsql?

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: How to implement transaction in plpgsql?
Дата
Msg-id m3sndphec0.fsf@belphigor.mcnaught.org
обсуждение исходный текст
Ответ на How to implement transaction in plpgsql?  ("Corn" <corn@tryit.com>)
Список pgsql-general
"Corn" <corn@tryit.com> writes:

> Dear all,
>
> How to implement transaction in plpgsql?
> I have try to use it but fail. And I don't know the reason.
> Here is my function...

You can't use transactions inside a function.  The reason is that when
a function executes you are already inside a transaction (every SQL
statement is a transaction if there is no explicit BEGIN) and PG
doesn't support nested transactions.

See the FAQ for more info; I'm pretty sure this issue is in there (if
not, it should be).

-Doug
--
Free Dmitry Sklyarov!
http://www.freesklyarov.org/

We will return to our regularly scheduled signature shortly.

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

Предыдущее
От: "Erol Öz"
Дата:
Сообщение: Ynt: pg_dump error - LOCALIZATION PROBLEM
Следующее
От: "Mitch Vincent"
Дата:
Сообщение: Re: Case sensitivity issue