Re: discard on constraint violation - Mailing list pgsql-general

From Guillaume Lelarge
Subject Re: discard on constraint violation
Date
Msg-id 1309179443.14751.15.camel@laptop
Whole thread Raw
In response to discard on constraint violation  (Sim Zacks <sim@compulab.co.il>)
List pgsql-general
On Mon, 2011-06-27 at 15:36 +0300, Sim Zacks wrote:
> Is there a way to tell a table to discard an insert if it violates a
> constraint (unique in my case) instead of giving an error? I don't want
> the overhead of a trigger on each row inserted.
>

Without a trigger, you can't.


--
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


pgsql-general by date:

Previous
From: Vincent Veyron
Date:
Subject: Re: An amusing MySQL weakness--not!
Next
From: Radoslaw Smogura
Date:
Subject: Re: Reusing cached prepared statement slow after 5 executions