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

From Stephan Szabo
Subject Re: Delete Order When Referential Integrity Is Active
Date
Msg-id 20021127095012.C94704-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Delete Order When Referential Integrity Is Active  (SZUCS Gábor <surrano@mailbox.hu>)
List pgsql-general
On Wed, 27 Nov 2002, [iso-8859-1] SZUCS G�bor wrote:

> ----- 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.

That's why it does in practice.  The question is whether that is compliant
behavior to the spec which I believe we are for this case although I'm not
sure about all of the cases.



pgsql-general by date:

Previous
From: "Ron St.Pierre"
Date:
Subject: Re: Select nextval problem
Next
From: "Johnson, Shaunn"
Date:
Subject: fatal error in database