Re: JOIN query not working as expected

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mario(dot)splivalo(at)mobart(dot)hr
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: JOIN query not working as expected
Date: 2005-12-06 15:02:31
Message-ID: 227.1133881351@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr> writes:
> I can create a FK on a column wich allows NULL values, and I can even
> insert rows with NULLs in FK column, although PK table where FK is
> pointing does not allow nuls. Is that 'by design', or...?

It's per SQL spec. Add a NOT NULL constraint to the column if you do
not wish to allow NULLs.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Lane Van Ingen 2005-12-06 15:10:55 Re: Database with "override" tables
Previous Message Mario Splivalo 2005-12-06 15:00:58 Re: JOIN query not working as expected