Re: Delete Order When Referential Integrity Is Active - Mailing list pgsql-general

From SZUCS Gábor
Subject Re: Delete Order When Referential Integrity Is Active
Date
Msg-id 012201c29636$8a2c13a0$0a03a8c0@fejleszt2
Whole thread Raw
In response to Re: Delete Order When Referential Integrity Is Active  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Delete Order When Referential Integrity Is Active
List pgsql-general
----- Original Message -----
From: "Stephan Szabo" <sszabo@megazone23.bigpanda.com>
Sent: Tuesday, November 26, 2002 4:23 AM


> the behavior you're looking for.  I haven't really looked to see if
> there's anything in the spec about the timing of dependent deletes as
> associated with triggers, though.


There is something in the docs about tuple visibility that states, "if a
query affects a row, each query in time after this one, no matter if it's
triggered by the original query or it's an independent query, sees the new
state of the tuple" or something like that.

Doesn't it apply to this case? I mean, reference is effectively a trigger,
something like

... AFTER DELETE ON MasterTable FROM DetailTable ...

so the DELETE's on DetailTable _must_ follow (in time) the DELETE on
MasterTable. Maybe it's the exact cause that the master row is deleted
first.

Gurus, please teach me something and tell me if my thoughts are right or not
:)

G.
--
while (!asleep()) sheep++;

---------------------------- cut here ------------------------------


pgsql-general by date:

Previous
From: Ken Guest
Date:
Subject: Re: rename
Next
From: Bruce Momjian
Date:
Subject: Re: Where do I finf directions and code to set up replication