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[.singh]@ EnterpriseDB.com
[EMAIL PROTECTED] gmail | hotmail | yahoo }.com

Reply via email to