bug in on_error_rollback !?

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: "PGSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: bug in on_error_rollback !?
Date: 2006-10-27 05:30:07
Message-ID: 65937bea0610262230g4f76da4dvf6fd8a24936f88f7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I was thinking of recommending this to someone, but wanted to try it on my
own first; good thing that I did. I think it is broken as of now.

I assume that the error thrown for 'select 1', inside a transaction, with
'on_error_rollback on', is not supposed to raise it's head !!!

Or am I missing something?

postgres=# select version();
version

--------------------------------------------------------------------------------------------------------
PostgreSQL 8.2beta1 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.2.3(mingw special 20030504-1)
(1 row)

postgres=# begin;
BEGIN
postgres=# \set on_error_rollback on
postgres=# select a;
ERROR: column "a" does not exist
LINE 1: select a;
^
postgres=# select 1;
ERROR: current transaction is aborted, commands ignored until end of
transaction block
postgres=# end;
ROLLBACK
postgres=# select a;
ERROR: column "a" does not exist
LINE 1: select a;
^
postgres=# select 1;
?column?
----------
1
(1 row)

postgres=#

--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | yahoo }.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2006-10-27 07:23:12 Re: bug in on_error_rollback !?
Previous Message Carl Norden 2006-10-27 02:13:10 Build of postgresql 8.2 beta 2 failure