Re: Can foreign keyed field allow nulls? - Mailing list pgsql-admin

From Stephan Szabo
Subject Re: Can foreign keyed field allow nulls?
Date
Msg-id Pine.BSF.4.21.0103051147500.63635-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Can foreign keyed field allow nulls?  (lbottorff@harveycounty.com)
List pgsql-admin
On Mon, 5 Mar 2001 lbottorff@harveycounty.com wrote:

> I have a table with a field I'd like to do a REFERENCES to a lookup table on;
> however, this field is not manditory, i.e., can be NULL. Is it possible to do
> such a thing?

Maybe.  If the key is a single column, it should be fine.  If it's a
multi-column key then it depends on what match type you are using.  For
MATCH FULL, all the columns must be null or none of the columns may be
null.  For the unspecified match type you can have a null in the key but
such a key will always succeed.



pgsql-admin by date:

Previous
From: lbottorff@harveycounty.com
Date:
Subject: Can foreign keyed field allow nulls?
Next
From: lbottorff@harveycounty.com
Date:
Subject: And the workaround is....?