Re: [HACKERS] Re: ALTER TABLE DROP COLUMN - Mailing list pgsql-hackers

From wieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] Re: ALTER TABLE DROP COLUMN
Date
Msg-id m12Pakv-0003kGC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: [HACKERS] Re: ALTER TABLE DROP COLUMN  (Hannu Krosing <hannu@tm.ee>)
Responses Re: [HACKERS] Re: ALTER TABLE DROP COLUMN  (Don Baccus <dhogaza@pacifier.com>)
Re: [HACKERS] Re: ALTER TABLE DROP COLUMN  (sszabo@bigpanda.com)
List pgsql-hackers
Hannu Krosing wrote:

> Don Baccus wrote:
>
> > donb=# update foo set i=i+1;
> > ERROR:  Cannot insert a duplicate key into unique index foo_pkey
>
> IIRC, the same behaviour plagued the old foreign key implementation
> in contrib, which was why it was refused for a long time to be
> integrated.
>
> I hope that at least the foreig keys don't do it anymore.
   ALL  the  FK  triggers  are  delayed  until  after the entire   statement (what's wrong for ON DELETE RESTRICT -
but that's   another  story), or until the entire transaction (in deferred   mode).
 
   But the UNIQUE constraint is still built upon  unique  nbtree   indices,  thus  failing  on  primary  key where such
aunique   index is automatically created for.
 
   I'm far too less familiar with our implementation  of  nbtree   to  tell  whether it would be possible at all to
delayunique   checking until statement end  or  XACT  commit.  At  least  I   assume  it  would  require some similar
techniqueof deferred   queue.
 


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: NOT {NULL|DEFERRABLE} (was: bug in 7.0)
Next
From: Don Baccus
Date:
Subject: Re: NOT {NULL|DEFERRABLE} (was: bug in 7.0)