RE: primary key question
От | Pablo Niklas |
---|---|
Тема | RE: primary key question |
Дата | |
Msg-id | XFMail.20000721091912.pniklas@bigfoot.com обсуждение исходный текст |
Ответ на | primary key question (Carolyn Lu Wong <carolyn@kss.net.au>) |
Список | pgsql-sql |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El 20-Jul-2000 Carolyn Lu Wong escribio: > create table aaa( > field1 .... not null, > field2 ...., > ...., > primary key (field1, field2) > ); > > Based on the above table definition, field2 allows null values. But > after the table created based on the above script, field2 becomes not > null. The only conclusion I come up with is setting the field as part of > the primary key, PostgreSQL automatically sets the field to not null. Or > is it something else? > > Is this a feature or bug? It's a SQL feature, because primary key must no contain null values. Pablo Niklas pniklas@bigfoot.com -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use Charset: noconv iQA/AwUBOXg9Mozs62hO+t8PEQIsGgCdFO5HlMTy087WsBFc3tPSGFBKGOUAni6C 2NnOSwcsnlNFrkNsPoV1N3u7 =Ex7i -----END PGP SIGNATURE-----
В списке pgsql-sql по дате отправления: