dbTalk Databases Forums  

[BUGS] BUG #2412: Foreing key accept nulls

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2412: Foreing key accept nulls in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default [BUGS] BUG #2412: Foreing key accept nulls - 04-29-2006 , 09:11 AM







The following bug has been logged online:

Bug reference: 2412
Logged by: Sidar Lopez Cruz
Email address: sidarlopez (AT) hotmail (DOT) com
PostgreSQL version: 8.1.3
Operating system: Ubuntu 6.04
Description: Foreing key accept nulls
Details:

I think that when I create table that have a foreing key to another one
these FK may not accept nulls by default.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: [BUGS] BUG #2412: Foreing key accept nulls - 04-29-2006 , 10:44 AM






On Fri, 28 Apr 2006, Sidar Lopez Cruz wrote:

Quote:
The following bug has been logged online:

Bug reference: 2412
Logged by: Sidar Lopez Cruz
Email address: sidarlopez (AT) hotmail (DOT) com
PostgreSQL version: 8.1.3
Operating system: Ubuntu 6.04
Description: Foreing key accept nulls
Details:

I think that when I create table that have a foreing key to another one
these FK may not accept nulls by default.
The SQL spec seems to say otherwise. A foreign key constraint with match
simple (unspecified) is considered satisfied if any component of the key
is null or there is a match in the referenced table. A foreign key
constraint with match full is considered satisified if all components of
the key is null or there is a match in the referenced table. For a
single column key, this means NULLs are acceptable unless the column has
other constraints (like not null).



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.