Re: Foreign Key Deferrable Misunderstanding or Bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paul Rogers <progers(at)sparkbase(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Foreign Key Deferrable Misunderstanding or Bug?
Date: 2009-08-06 21:47:00
Message-ID: 5976.1249595220@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Paul Rogers <progers(at)sparkbase(dot)com> writes:
> Why does the attached script fail with a foreign key constraint violation?

The ON DELETE RESTRICT is why. Per the fine manual:

[RESTRICT] is the same as NO ACTION except that the check is not
deferrable.

It's a bit odd, but that's the best interpretation we can make of the
spec's wording about how this should work.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2009-08-06 21:47:40 Re: Foreign Key Deferrable Misunderstanding or Bug?
Previous Message Merlin Moncure 2009-08-06 21:37:58 Re: Empty Updates, ON UPDATE triggers and Rules