Re: Delete Order When Referential Integrity Is Active

From: SZUCS Gábor <surrano(at)mailbox(dot)hu>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Delete Order When Referential Integrity Is Active
Date: 2002-11-27 17:00:46
Message-ID: 012201c29636$8a2c13a0$0a03a8c0@fejleszt2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

----- Original Message -----
From: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)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 ------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-11-27 17:02:58 Re: Where do I finf directions and code to set up replication
Previous Message Tom Lane 2002-11-27 16:57:04 Re: [GENERAL] FreeBSD, Linux: select, select count(*) performance