From: | Pablo Niklas <pniklas(at)bigfoot(dot)com> |
---|---|
To: | Carolyn Lu Wong <carolyn(at)kss(dot)net(dot)au> |
Cc: | "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | RE: primary key question |
Date: | 2000-07-25 16:37:20 |
Message-ID: | XFMail.20000721091912.pniklas@bigfoot.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)bigfoot(dot)com
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv
iQA/AwUBOXg9Mozs62hO+t8PEQIsGgCdFO5HlMTy087WsBFc3tPSGFBKGOUAni6C
2NnOSwcsnlNFrkNsPoV1N3u7
=Ex7i
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Richards | 2000-07-25 18:13:59 | Re: command in C |
Previous Message | Jerome Raupach | 2000-07-25 16:28:39 | command in C++ |