Re: A bad behavior under autocommit off mode - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A bad behavior under autocommit off mode
Date
Msg-id 22327.1045755531@sss.pgh.pa.us
Whole thread Raw
In response to A bad behavior under autocommit off mode  (Hiroshi Inoue <Inoue@tpf.co.jp>)
Responses Re: A bad behavior under autocommit off mode
Re: A bad behavior under autocommit off mode
List pgsql-hackers
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?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: deleting dependencies
Next
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: A bad behavior under autocommit off mode