Re: DEFERRABLE NOT NULL constraint - Mailing list pgsql-general

From Dean Rasheed
Subject Re: DEFERRABLE NOT NULL constraint
Date
Msg-id CAEZATCWPdue3jyP6uRVkyFn8Mk-wXNBRcuH5u1SREOf4MmngYA@mail.gmail.com
Whole thread Raw
In response to Re: DEFERRABLE NOT NULL constraint  (Bèrto ëd Sèra <berto.d.sera@gmail.com>)
Responses Re: DEFERRABLE NOT NULL constraint
List pgsql-general
On 7 February 2013 09:02, B=E8rto =EBd S=E8ra <berto.d.sera@gmail.com> wrot=
e:
> 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

pgsql-general by date:

Previous
From: Bèrto ëd Sèra
Date:
Subject: Re: DEFERRABLE NOT NULL constraint
Next
From: Bèrto ëd Sèra
Date:
Subject: Re: DEFERRABLE NOT NULL constraint