From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | Bèrto ëd Sèra <berto(dot)d(dot)sera(at)gmail(dot)com> |
Cc: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "Gavan Schneider *EXTERN*" <pg-gts(at)snkmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: DEFERRABLE NOT NULL constraint |
Date: | 2013-02-07 09:09:20 |
Message-ID: | CAEZATCWPdue3jyP6uRVkyFn8Mk-wXNBRcuH5u1SREOf4MmngYA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 7 February 2013 09:02, Bèrto ëd Sèra <berto(dot)d(dot)sera(at)gmail(dot)com> wrote:
> Hi
>
>> also a
>> deferrable primary key/unique constraint can't be used as the target
>> for a foreign key.
>
> ehr, why? I mean, I'm positive it cannot be used before an actual
> value is in the record, but what would be the problem, apart from
> that?
>
This restriction is specified in the SQL standard.
I think most of the problems occur with CASCADE actions. E.g., if the
row you refer to isn't currently unique, and then it is updated, how
should those updates cascade to the referencing rows?
There might be something that could be done (perhaps if only RESTRICT
or NO ACTION is specified), but at the moment PostgreSQL doesn't
support it.
Regards,
Dean
From | Date | Subject | |
---|---|---|---|
Next Message | Bèrto ëd Sèra | 2013-02-07 09:14:16 | Re: DEFERRABLE NOT NULL constraint |
Previous Message | Bèrto ëd Sèra | 2013-02-07 09:02:12 | Re: DEFERRABLE NOT NULL constraint |