Re: BUG #13665: Foreign Key constraint doesn't work - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #13665: Foreign Key constraint doesn't work
Date
Msg-id 20151007022402.GA4405@alvherre.pgsql
Whole thread Raw
In response to BUG #13665: Foreign Key constraint doesn't work  (irina.guberman@gmail.com)
List pgsql-bugs
irina.guberman@gmail.com wrote:
> The following bug has been logged on the website:
>
> Bug reference:      13665
> Logged by:          Irina
> Email address:      irina.guberman@gmail.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

pgsql-bugs by date:

Previous
From: irina.guberman@gmail.com
Date:
Subject: BUG #13665: Foreign Key constraint doesn't work
Next
From: Francisco Olarte
Date:
Subject: Re: BUG #13665: Foreign Key constraint doesn't work