Re: Transaction blocks

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Transaction blocks
Дата
Msg-id 20050811132451.GA91227@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Transaction blocks  (Alexander Kotelnikov <sacha@myxomop.com>)
Список pgsql-novice
On Thu, Aug 11, 2005 at 04:03:45PM +0400, Alexander Kotelnikov wrote:
> >>>>> On Wed, 10 Aug 2005 18:25:57 -0600
> >>>>> "MF" == Michael Fuhr <mike@fuhr.org> wrote:
> MF>
> MF> http://www.postgresql.org/docs/8.0/static/plpgsql-structure.html
> MF>
> MF> "Functions and trigger procedures are always executed within a
> MF> transaction established by an outer query -- they cannot start or
> MF> commit that transaction, since there would be no context for them
> MF> to execute in."
>
> Oops, I missed this, thanks. But what about PL's other than pgsql?

The statement itself (i.e., the outer query) has transaction
semantics, regardless of what language is used for the functions
it calls.

http://www.postgresql.org/docs/8.0/static/tutorial-transactions.html

"PostgreSQL actually treats every SQL statement as being executed
within a transaction.  If you do not issue a BEGIN command, then
each individual statement has an implicit BEGIN and (if successful)
COMMIT wrapped around it.  A group of statements surrounded by BEGIN
and COMMIT is sometimes called a _transaction block_."

--
Michael Fuhr

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

Предыдущее
От: Sivakumar K
Дата:
Сообщение: Re: postgresql with ssl on windows
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: connection trouble