Re: BUG #2412: Foreing key accept nulls
От | Stephan Szabo |
---|---|
Тема | Re: BUG #2412: Foreing key accept nulls |
Дата | |
Msg-id | 20060429083944.Y52950@megazone.bigpanda.com обсуждение исходный текст |
Ответ на | BUG #2412: Foreing key accept nulls ("Sidar Lopez Cruz" <sidarlopez@hotmail.com>) |
Список | pgsql-bugs |
On Fri, 28 Apr 2006, Sidar Lopez Cruz wrote: > > The following bug has been logged online: > > Bug reference: 2412 > Logged by: Sidar Lopez Cruz > Email address: sidarlopez@hotmail.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).
В списке pgsql-bugs по дате отправления: