Re: [HACKERS] RI generic trigger procs
Hannu Krosing <hannu@trust.ee>
From: Hannu Krosing <hannu@trust.ee>
To: Jan Wieck <wieck@debis.com>
Cc: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Date: 1999-09-29T20:37:50Z
Lists: pgsql-hackers
Jan Wieck wrote:
>
> Any combination of attributes in a table referenced to by one
> or more FOREIGN KEY ... REFERENCES constraint of another
> table shall have a UNIQUE and NOT NULL constraint.
...
> So we assume here that any PK is unique and cannot contain NULL's.
What is the reasoning behind requiring this ?
I can't see anything that would mandate this -
* NULLs are'nt equal anyway and ar even disregarded under your
current description.
Or are you just protecting yourself against the case where the
foreign key field is set to null - could this be handled the
same as deleting for cascaded constraints ?
* UNIQUE would save us the check for existing other possible
referenced values - is this mandated by SQL spec ?
-------------
Hannu