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