Re: define transaction within pg/psql. Necessary?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: define transaction within pg/psql. Necessary?
Дата
Msg-id 4B7D115E.8010603@archonet.com
обсуждение исходный текст
Ответ на define transaction within pg/psql. Necessary?  (Antonio Goméz Soto<antonio.gomez.soto@gmail.com>)
Ответы Re: define transaction within pg/psql. Necessary?  (Antonio Goméz Soto<antonio.gomez.soto@gmail.com>)
Список pgsql-general
On 18/02/10 10:02, Antonio Goméz Soto wrote:
>
> if I define a pg/pgsql function, and I call that outside a transaction,
> does it create one for itself? Or should I add BEGIN and COMMIT
> statements within
> the function?

You can't call a function outside a transaction. Every statement in
PostgreSQL is inside a transaction, either one you define yourself, or
an implicit one that just lasts for the duration of one statement.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: define transaction within pg/psql. Necessary?
Следующее
От: dipti shah
Дата:
Сообщение: Re: Define permissions at database level