Skip site navigation (1) Skip section navigation (2)

Re: Deferrable UNIQUE INDEX?

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Deferrable UNIQUE INDEX?
Date: 2006-01-04 02:20:43
Message-ID: 5BE5F9B3-A085-46AD-8E95-613EDF14C61B@myrealbox.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Jan 3, 2006, at 19:45 , David Fetter wrote:

> Dang!  Everything was going to be kosher at the end of the
> transaction, but I never got a chance.
>
> Is there some way to make the index check INITIALLY DEFERRABLE the way
> a regular column/table constraint could be?

Happy New Year, David!

I've run into this when reorganizing nested-set hierarchies (though  
then it's with integers rather than text). There isn't a way to do  
this directly, as you've found out, but you can use a similar  
workaround. You could prepend a string to the key during the  
permutation, and strip the prefix after permutation is finished.

Not the answer you're looking for, but perhaps you'll be able to use  
this workaround.

Michael Glaesemann
grzm myrealbox com



In response to

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2006-01-04 02:33:41
Subject: Re: Deferrable UNIQUE INDEX?
Previous:From: Euler Taveira de OliveiraDate: 2006-01-04 02:18:06
Subject: Re: Inconsistent syntax in GRANT

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group