Skip site navigation (1) Skip section navigation (2)

Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: olly(at)lfix(dot)co(dot)uk, Ian Barwick <barwick(at)gmail(dot)com>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK
Date: 2004-10-27 20:21:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Oliver Elphick wrote:
>> On Tue, 2004-10-26 at 21:42 -0400, Bruce Momjian wrote:
>>> test=> begin;
>>> test=> commit;
>>> test=> commit;
>>> WARNING:  there is no transaction in progress
>> 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.


			regards, tom lane

In response to


pgsql-hackers by date

Next:From: ohpDate: 2004-10-27 20:31:44
Subject: Re: Unixware 714 pthreads
Previous:From: Greg StarkDate: 2004-10-27 19:39:16
Subject: Re: Should bgwriter log checkpoint start/end?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group