Re: A bad behavior under autocommit off mode

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: A bad behavior under autocommit off mode
Дата
Msg-id 3E7930E5.722BF0C9@tpf.co.jp
обсуждение исходный текст
Ответ на Re: A bad behavior under autocommit off mode  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: A bad behavior under autocommit off mode
Re: A bad behavior under autocommit off mode
Список pgsql-hackers
Bruce Momjian wrote:
> 
> Hiroshi Inoue wrote:
> > Bruce Momjian wrote:
> > >
> > > OK, I have a patch to fix this bug.  The basic problem is that when a
> > > multi-query string is passed to the backend, it is treated as a single
> > > transaction _unless_ a transaction or GUC command appears in the string.
> > > When they appear, a transaction is forced, but the normal transaction
> > > state machine has been bypassed, meaning in:
> > >
> > >         SET autocommit TO off; SELECT 1; COMMIT;
> > >
> > > when the COMMIT arrives, the transaction state machines hasn't seen the
> > > SELECT because the mechanism is bypassing the state machine to try and
> > > get everything into the same transaction.
> > >
> > > This patch removes that "stuff all queries into a single transaction"
> > > behavior and makes them function just like queries arriving separately.
> > > This does BREAK BACKWARD COMPATIBILITY.  However, if they want the old
> > > behavior, they just need to wrap BEGIN/COMMIT around the query string.
> >
> > Does the change worth the trouble ?
> > Please don't break BACKWARD COMPATIBILITY easily.
> 
> It clearly fixes an existing bug,

My proposal also fixes the bug though Tom objected to it.

regards,
Hiroshi Inouehttp://www.geocities.jp/inocchichichi/psqlodbc/


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