Re: BUG #13665: Foreign Key constraint doesn't work

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: irina(dot)guberman(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13665: Foreign Key constraint doesn't work
Date: 2015-10-07 02:24:02
Message-ID: 20151007022402.GA4405@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

irina(dot)guberman(at)gmail(dot)com wrote:
> The following bug has been logged on the website:
>
> Bug reference: 13665
> Logged by: Irina
> Email address: irina(dot)guberman(at)gmail(dot)com
> PostgreSQL version: 9.4.4
> Operating system: Mac
> Description:
>
> I can enter rows with null value in a foreign key constrained column.

Yes. This is not a bug. If you want to prohibit NULL values, you need
to declare the column as NOT NULL.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Francisco Olarte 2015-10-07 10:36:45 Re: BUG #13665: Foreign Key constraint doesn't work
Previous Message irina.guberman 2015-10-06 22:42:12 BUG #13665: Foreign Key constraint doesn't work