Re: A bad behavior under autocommit off mode

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: A bad behavior under autocommit off mode
Дата
Msg-id 001901c2d8fe$89ddea30$0e283ddb@PbgX
обсуждение исходный текст
Ответ на Re: A bad behavior under autocommit off mode  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: A bad behavior under autocommit off mode
Список pgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
> 
> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > There seems a bad behavior under autocommit off mode.
> 
> >   1) psql -c 'set autocommit to off;select 1;commit'
> > causes a WARNING:  COMMIT: no transaction in progress
> 
> Surely that's a bug: the SELECT ought to start a transaction block.
> 
> Barry Lind reported what is probably a closely related issue:
> http://archives.postgresql.org/pgsql-hackers/2003-01/msg00592.php
> 
> I haven't gotten around to looking at this, but I suspect postgres.c
> is doing something inside the per-querytree loop that it should be
> doing outside it, or vice versa.  Or possibly the problem is with
> the klugy way that we hacked autocommit-off into the xact.c state
> machine.  Do you have time to look at it?

I have little time. 

The transaction block state seems to be set just before returning from
the chained query. I don't know if it's bad or not.
The simplest way seems to accept COMMIT any time under autocommit
off mode.

regards,
Hiroshi Inoue



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

Предыдущее
От: "Jason M. Felice"
Дата:
Сообщение: Query planner/stored procedure cost
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: request for sql3 compliance for the update command