Re: Referential Integrity Question (Delete/Insert during Transaction)

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Referential Integrity Question (Delete/Insert during Transaction)
Дата
Msg-id Pine.BSF.4.21.0106181557230.87232-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Referential Integrity Question (Delete/Insert during Transaction)  (Stef Telford <stef@chronozon.artofdns.com>)
Список pgsql-sql
On Mon, 18 Jun 2001, Stef Telford wrote:
>     
>     I seem to have hit what i -think- may be a bug (but i am not crying
> wolf jst yet ;).
> 
>     I have three tables. action, client and order_details. action has a primary
> key 'order', client references action (along with adding the client_id as 
> part of its primary key), order_details references client (both parts of the 
> primary key there). all foreign keys (order in client and order+client_id in
> order_details) are set to INITIALLY DEFERRED. so far so good i hope.
> 
>     Now. the way i understand it, shouldnt the integrity of any foreign keys
> be checked at the -end- of the transaction, after all the commands have been
> processed ? it seems that the DELETE is being processed and rejected, but
> the foreign key would be 'okay' due to the following INSERT.  I have tried 
> SET CONSTRAINTS as well with no difference :\

Yes.  There's a problem where intermediate conditions are being checked in
certain sequences of deferred constraints.  It should be fixed for 7.2.



В списке pgsql-sql по дате отправления:

Предыдущее
От: Christopher Smith
Дата:
Сообщение: Re: Problems ensuring uniqueness?
Следующее
От: "Josh Berkus"
Дата:
Сообщение: A cute little function