Re: session-wide autocommit off

Поиск
Список
Период
Сортировка
От Christoph Haller
Тема Re: session-wide autocommit off
Дата
Msg-id 41AC62C0.34D50EC7@rodos.fzk.de
обсуждение исходный текст
Ответ на session-wide autocommit off  (Christoph Haller <ch@rodos.fzk.de>)
Список pgsql-sql
Richard Huxton wrote:

> Christoph Haller wrote:
> > Looks like I asked the wrong question the other day.
> > How can I achieve a session-wide autocommit off?
> > As it is possible inside a psql session via
> > \unset AUTOCOMMIT
> > I am using the libpq interface.
>
> Just BEGIN a transaction after connection? Or am I missing something here?
>

Since the server-side autocommit off was abolished in 7.4
I am looking for a session-wide replacement, meaning
as long as one connection is running, after every COMMIT
the next SQL-command triggers an implicit BEGIN.
I know the usual answer to requests like this is "Fix Your Code",
but the Release Notes on 7.4 state
The server-side autocommit setting was removed and reimplemented in
client applications and languages. Server-side
autocommit was causing too many problems with languages and applications
that wanted to control their own autocommit
behavior, so autocommit was removed from the server and added to
individual client APIs as appropriate.

So basically, I cannot find the autocommit-off-switch within the libpg
interface.
TIA
Regards, Christoph




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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: session-wide autocommit off
Следующее
От: "Andrew Thorley"
Дата:
Сообщение: inserting values into types