Re: Deferred uniqueness versus foreign keys

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)googlemail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Deferred uniqueness versus foreign keys
Date: 2009-07-28 21:16:28
Message-ID: 1248815788.18098.198.camel@monkey-cat.sm.truviso.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2009-07-28 at 22:10 +0100, Dean Rasheed wrote:
> Hmm, yes, looking in the SQL spec, I've just noticed this under 11.8,
> referential constraint definition:
>
> "The table constraint descriptor describing the <unique constraint
> definition> whose <unique column list> identifies the referenced
> columns shall indicate that the unique constraint is not deferrable."
>
> which seems like a sensible policy now that I think about it.

Is it a problem to allow unique constraints to be deferrable until the
end of the command though? To meet the spec, "SET i = i + 1" should work
even if "i" is referenced by a FK.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-07-28 21:40:20 Re: Deferred uniqueness versus foreign keys
Previous Message Martijn van Oosterhout 2009-07-28 21:11:13 Re: plpgsql: support identif%TYPE[], (from ToDo)