pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: mario.splivalo@mobart.hr
Cc: pgsql-sql@postgresql.org
Subject: Re: JOIN query not working as expected
Date: Tue, 06 Dec 2005 10:02:31 -0500
Message-ID: <227.1133881351@sss.pgh.pa.us> (raw)
In-Reply-To: <1133881258.8161.28.camel@ekim>
References: <1133878084.8161.22.camel@ekim>
	<164.1133881091@sss.pgh.pa.us>
	<1133881258.8161.28.camel@ekim>

Mario Splivalo <mario.splivalo@mobart.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



view thread (4+ messages)

Message-ID: <227.1133881351@sss.pgh.pa.us>
Permalink:  ../227.1133881351@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/227.1133881351@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mario.splivalo@mobart.hr
  Subject: Re: JOIN query not working as expected
  In-Reply-To: <227.1133881351@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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