Re: error handling

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Verena Ruff <lists(at)triosolutions(dot)at>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: error handling
Date: 2006-04-27 19:48:03
Message-ID: 20060427194803.GA990@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, Apr 27, 2006 at 15:29:07 +0200,
Verena Ruff <lists(at)triosolutions(dot)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.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message me 2006-04-28 01:29:58 8.1 (win32): partial index not used?
Previous Message Christian Hofmann 2006-04-27 17:35:27 Re: Getting the indexes of a table