Re: unique & update - Mailing list pgsql-general

From Ben-Nes Michael
Subject Re: unique & update
Date
Msg-id 001601c1aa8a$b2a12ac0$aa0f5ac2@canaan.co.il
Whole thread Raw
In response to Re: unique & update  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: unique & update  (Darren Ferguson <darren@crystalballinc.com>)
List pgsql-general
> > Is there a way to do UNIQUE check after the whole table got updated ?
> > If not, any ideas to walk around the problem ?
> The closest thing I could think of would be a constraint trigger that did
> a uniqueness check but that'll probably be somewhat slower (a trigger that
> looks for something like: select lft from areas group by lft having
> count(*)>1;)

How can I rollback in a function ?
I mean after update has been done, I do some checking in the Function and
then decide that I want to quit and rollback all what inserted/updated in
the start of the function ?

Also if I attach trigger that check column uniqueness to an update will it
check it per updated row or at the end of the action after all the table got
updated ?

Cheer

--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--------------------------



pgsql-general by date:

Previous
From: Darren Ferguson
Date:
Subject: Returning a CURSOR from plpgsql functions
Next
From: "Gregory Wood"
Date:
Subject: Re: unique & update