On 21/05/2007 05:26, novnov wrote:
OK, but, how do I set this up to do what I need? I want an insert that would
create a dupe key to be rolled back, and inserts that would not create dupe
keys to be committed.
Do you specifically need it in a trigger? I seem to recall an example in
the docs for pl/pgsql demonstrating a function to do something like this
- I think it tries an INSERT, and when a duplicate key raises an
exception, it does an update instead. - You could easily adapt this to
your purposes.
Ray.
---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
[EMAIL PROTECTED]
---------------------------------------------------------------
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster