Re: Disable Transaction - plans ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Disable Transaction - plans ?
Дата
Msg-id 1190.1003973376@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Disable Transaction - plans ?  ("Dominic J. Eidson" <sauron@the-infinite.org>)
Список pgsql-general
Mike Mascari <mascarm@mascari.com> writes:
> So would it be
> possible to modify PQFinish() to examine whether autocommit = true,
> and if so, issue a commit before disconnect, else just disconnect?

That's just a slightly different way of shooting yourself in the foot.
What's the difference whether it's libpq or the backend that pulls
the trigger?  It's still not an explicit decision by the client.

I guess I do not understand the motivation for this proposal.
As I see it, the idea is that the client does not want an autocommit,
so he sets an option saying "no autocommit, hold transaction open until
I explicitly commit".  Why exactly would such a client think that an
autocommit on disconnect is a good idea?  The whole POINT is to require
an explicit commit command.  (ie, the client wants the gun in his own
hand, no delegation of the trigger decision, thank you very much)

ISTM people who like autocommit will be using our existing behavior.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Function won't compile
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Disable Transaction - plans ?