pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Can foreign keyed field allow nulls?
2+ messages / 2 participants
[nested] [flat]

* Can foreign keyed field allow nulls?
@ 2001-03-05 19:29 lbottorff@harveycounty.com
  2001-03-05 19:49 ` Re: Can foreign keyed field allow nulls? Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 1 reply; 2+ messages in thread

From: lbottorff@harveycounty.com @ 2001-03-05 19:29 UTC (permalink / raw)
  To: pgsql-admin

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?

LB





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Can foreign keyed field allow nulls?
  2001-03-05 19:29 Can foreign keyed field allow nulls? lbottorff@harveycounty.com
@ 2001-03-05 19:49 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephan Szabo @ 2001-03-05 19:49 UTC (permalink / raw)
  To: lbottorff@harveycounty.com; +Cc: 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.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-03-05 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-05 19:29 Can foreign keyed field allow nulls? lbottorff@harveycounty.com
2001-03-05 19:49 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox