Re: Preventing an 'after' trigger from causing rollback on error

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Eliot Gable <egable+pgsql-general(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Preventing an 'after' trigger from causing rollback on error
Date: 2012-04-14 00:06:40
Message-ID: CAOR=d=33VO0t4BLAcaf=qudCbTzvwJt39g702V4MuNbmCKR=fg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Apr 13, 2012 at 3:58 PM, Eliot Gable
<egable+pgsql-general(at)gmail(dot)com> wrote:
> Is there any way I can stop a trigger which fires after a row is inserted
> into a table from causing a rollback of the entire transaction if something
> goes wrong?

Take look here:

http://www.postgresql.org/docs/9.0/static/plpgsql-porting.html

Specifically the part about:

BEGIN
INSERT INTO cs_jobs (job_id, start_stamp) VALUES (v_job_id, now());
EXCEPTION
WHEN unique_violation THEN (2)
-- don't worry if it already exists
END;

In response to

Browse pgsql-general by date

  From Date Subject
Next Message leaf_yxj 2012-04-14 01:17:56 how to list all the schema and the privileges which is granted to users.THanks.
Previous Message Jeff Davis 2012-04-13 23:56:42 Re: Preventing an 'after' trigger from causing rollback on error