Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK
Date
Msg-id 24445.1098908513@sss.pgh.pa.us
Whole thread Raw
In response to Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Oliver Elphick wrote:
>> On Tue, 2004-10-26 at 21:42 -0400, Bruce Momjian wrote:
>>> test=> begin;
>>> BEGIN
>>> test=> commit;
>>> COMMIT
>>> test=> commit;
>>> WARNING:  there is no transaction in progress
>>> ROLLBACK
>> 
>> It's still a misleading message; in those circumstances, how about
>> returning "NO ACTION" instead?

> Uh, it took a lot of discussion to agree on ROLLBACK.  It would take
> even more discussion to add a new tag return value.

I don't care for "NO ACTION" either.  However, the prior discussion had
to do with what to echo in the case that you are saying COMMIT in a
failed transaction.  I don't think anyone thought about this particular
corner case, viz COMMIT outside any transaction.  I think you could make
a reasonable argument that the tag should remain COMMIT for this case,
since we do not consider it an error.

On the other hand, it's also a pretty minor issue, and if it turns out
to require a lot of code rejiggering to make it do that, I'd not think
it worthwhile.

Comments?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Should bgwriter log checkpoint start/end?
Next
From: ohp@pyrenet.fr
Date:
Subject: Re: Unixware 714 pthreads