Re: Raise functionality

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Raise functionality
Date: 2009-11-16 09:14:44
Message-ID: hdr564$7q9$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2009-11-05, Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:
> On Thu, Nov 05, 2009 at 08:24:24AM -0600, Michael Gould wrote:
>> We want to control from our application how to handle certain exceptions. I
>> believe that Raise is the functionality that we want to use. The
>> documentation is a little light on what happens on the client side.
>
> That's because it's up to the client to decide what to do. You'll need
> to look at the documentation of whatever library/code you're using
> to talk to PG. PG just aborts the transaction for anything apart
> from NOTIFY and hence your client will just see the transaction/query
> failing. How you disentangle this is up to your code and how they with
> your drivers.

NOTICE, LOG, and DEBUG events are non-terminating, only EXCEPTION cancels the
transaction. NOTIFY is something completely different.
there is an option that must be set to make the events visible, I
forget what it is.

look up PQsetNoticeProcessor

At work we exploit notices to control our application's GUI.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2009-11-16 09:18:37 Re: re-using RETURNING
Previous Message Jasen Betts 2009-11-16 08:46:46 Re: Backups