RE: primary key question - Mailing list pgsql-sql

From Pablo Niklas
Subject RE: primary key question
Date
Msg-id XFMail.20000721091912.pniklas@bigfoot.com
Whole thread Raw
In response to primary key question  (Carolyn Lu Wong <carolyn@kss.net.au>)
List 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 by date:

Previous
From: JanWieck@t-online.de (Jan Wieck)
Date:
Subject: Re: TCL updates
Next
From: Jerome Raupach
Date:
Subject: command in C++