Re: Foreign key constraint delete fire order

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "CN" <cnliou9(at)fastmail(dot)fm>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Foreign key constraint delete fire order
Date: 2006-09-29 15:24:38
Message-ID: 16370.1159543478@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"CN" <cnliou9(at)fastmail(dot)fm> writes:
> I wish foreign key constraint trigger guarantees that rows in
> referensing table are deleted before the rows in referenced table is
> deleted.
> ...
> Does my wish make sense or violate any standard?

Sorry, the SQL standard says that it happens in the current order (rows
deleted as a consequence of RI actions are to be dropped at the *end* of
the SQL-statement).

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2006-09-29 15:29:23 Re: benchmark suite
Previous Message Paul B. Anderson 2006-09-29 15:12:08 Re: Stored procedure array limits