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

Re: bug in on_error_rollback !?

From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
Cc: PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bug in on_error_rollback !?
Date: 2006-10-27 07:23:12
Message-ID: 0A7E1F8ADA2DB302DC078260@[172.26.14.247] (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackers
--On Freitag, Oktober 27, 2006 11:00:07 +0530 Gurjeet Singh 
<singh(dot)gurjeet(at)gmail(dot)com> wrote:

> 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?
>

[...]


You have to specify the parameter in upper case:

bernd(at)[local]:bernd #= BEGIN;
BEGIN
bernd(at)[local]:bernd #*= \set ON_ERROR_ROLLBACK
bernd(at)[local]:bernd #*= SELECT a;
ERROR:  column "a" does not exist
LINE 1: SELECT a;
               ^
bernd(at)[local]:bernd #*= SELECT 1;
 ?column?
----------
        1
(1 row)

-- 
  Thanks

                    Bernd

In response to

pgsql-hackers by date

Next:From: Alexey ZayatsDate: 2006-10-27 07:41:05
Subject: BUG #2724: Could not check connection status with "ssl=on"
Previous:From: Gurjeet SinghDate: 2006-10-27 05:30:07
Subject: bug in on_error_rollback !?

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