Re: error handling - Mailing list pgsql-novice

From Bruno Wolff III
Subject Re: error handling
Date
Msg-id 20060427194803.GA990@wolff.to
Whole thread Raw
In response to error handling  (Verena Ruff <lists@triosolutions.at>)
Responses Re: error handling
List pgsql-novice
On Thu, Apr 27, 2006 at 15:29:07 +0200,
  Verena Ruff <lists@triosolutions.at> wrote:
> Hello,
>
> I have a table with an UNIQUE constraint. Is it possible to have
> something like a trigger (or error handler) which is called every time
> a insert statement would break this constraint?  Or in some simple cases
> that this record is just dropped silently, without reporting an error?

Unique constraints are not deferrable in Postgres. It would be possible to
have a function do the insert and trap errors. I don't know if that will
help in your situation though.

pgsql-novice by date:

Previous
From: "Christian Hofmann"
Date:
Subject: Re: Getting the indexes of a table
Next
From:
Date:
Subject: 8.1 (win32): partial index not used?