Re: Foreign Key Deferrable Misunderstanding or Bug?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
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:40
Message-ID: 20090806144542.Y96899@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 6 Aug 2009, Paul Rogers wrote:

> Why does the attached script fail with a foreign key constraint violation?

Referential actions are not deferred when a constraint is marked
deferrable (as that appears to be what the spec wants), so ON DELETE
RESTRICT will still fail on the statement, while ON DELETE NO ACTION (ie,
only check at constraint check time) should wait to the end.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Trutwin 2009-08-06 22:33:24 Re: Empty Updates, ON UPDATE triggers and Rules
Previous Message Tom Lane 2009-08-06 21:47:00 Re: Foreign Key Deferrable Misunderstanding or Bug?