Re: [HACKERS] Re: ALTER TABLE DROP COLUMN

Поиск
Список
Период
Сортировка
От wieck@debis.com (Jan Wieck)
Тема Re: [HACKERS] Re: ALTER TABLE DROP COLUMN
Дата
Msg-id m12Pakv-0003kGC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: ALTER TABLE DROP COLUMN  (Hannu Krosing <hannu@tm.ee>)
Ответы Re: [HACKERS] Re: ALTER TABLE DROP COLUMN  (Don Baccus <dhogaza@pacifier.com>)
Re: [HACKERS] Re: ALTER TABLE DROP COLUMN  (sszabo@bigpanda.com)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: NOT {NULL|DEFERRABLE} (was: bug in 7.0)
Следующее
От: Don Baccus
Дата:
Сообщение: Re: NOT {NULL|DEFERRABLE} (was: bug in 7.0)