Re: how do you get there from here?

Поиск
Список
Период
Сортировка
Искать
От
Alban Hertroys
Тема
Re: how do you get there from here?
Дата
в 06:13:03
Msg-id
51E9F96F-CD48-47D6-AF98-183B2E8770BF@solfertje.student.utwente.nl
Ответ на
Список
Дерево обсуждения
how do you get there from here? "Michael P. Soulier" <michael_soulier@mitel.com>
Re: how do you get there from here? Tom Lane <tgl@sss.pgh.pa.us>
Re: how do you get there from here? "Michael P. Soulier" <michael_soulier@mitel.com>
Re: how do you get there from here? Tom Lane <tgl@sss.pgh.pa.us>
Re: how do you get there from here? "Michael P. Soulier" <michael_soulier@mitel.com>
Re: how do you get there from here? Tom Lane <tgl@sss.pgh.pa.us>
Re: how do you get there from here? "Michael P. Soulier" <michael_soulier@mitel.com>
Re: how do you get there from here? "Michael P. Soulier" <michael_soulier@mitel.com>
Re: how do you get there from here? Alban Hertroys <dalroi@solfertje.student.utwente.nl>
Re: how do you get there from here? "Michael P. Soulier" <michael_soulier@mitel.com>
On May 13, 2009, at 8:48 PM, Michael P. Soulier wrote:

> Can someone suggest a better way that doesn't hit this "pending  
> trigger"
> issue while in a transaction?


IIRC you had an initially deferred foreign key constraint? Do you  
absolutely need that to be initially deferred, or deferrable even?  
Because that's what's causing your problem, not the foreign key  
constraint itself.

If that FK does need to be initially deferred, as a workaround you can  
temporarily disable the foreign key while doing your updates. Easiest  
is to drop the constraint, do your updates and recreate the  
constraint, at which point the database will verify that the related  
records match the constraint. Of course this opens a risk where a  
record gets inserted that doesn't match your FK constraint which will  
cause recreation to error out and your transaction to rollback.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,4a0d321a10092082955122!


В списке pgsql-general по дате отправления
От: Raymond O'Donnell
Дата:
Сообщение: Re: Where is pg_dump?
От: Tom Lane
Дата:
FAQ