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

From Ian Barwick
Subject Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK
Date
Msg-id 1d581afe04102623424ba97bfb@mail.gmail.com
Whole thread Raw
In response to Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Tue, 26 Oct 2004 21:42:19 -0400 (EDT), Bruce Momjian
<pgman@candle.pha.pa.us> wrote:
> Ian Barwick wrote:
> 
> 
> > just wondering:
> >
> > test=> select version();
> >                                          version
> > ------------------------------------------------------------------------------------------
> >  PostgreSQL 8.0.0beta4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
> > 3.3.3 (SuSE Linux)
> > (1 row)
> >
> > test=> begin;
> > BEGIN
> > test=> commit;
> > COMMIT
> > test=> commit;
> > WARNING:  there is no transaction in progress
> > ROLLBACK
> >
> > Is there any reason ROLLBACK and not COMMIT is echoed here?
> 
> Because the transaction was not committed, but rather rolled back.

Aha. It had me a little confused because between the first COMMIT and
the second there were several screens of data, and I wasn't sure if
I'd issued the first COMMIT. Seeing ROLLBACK made me unsure whether I
was still in a transaction which had in just been rolled back.

Pre 8.0 versions echo COMMIT in this situation.

Thanks

Ian Barwick
barwick@gmail.com


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: pg_dump test success
Next
From: Simon Riggs
Date:
Subject: Re: Should bgwriter log checkpoint start/end?