primary key question - Mailing list pgsql-sql

From Carolyn Lu Wong
Subject primary key question
Date
Msg-id 3976A9A6.55E6BE2E@kss.net.au
Whole thread Raw
Responses RE: primary key question  (Pablo Niklas <pniklas@bigfoot.com>)
List pgsql-sql
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?


pgsql-sql by date:

Previous
From: Carolyn Lu Wong
Date:
Subject: from not null field to nullable field?
Next
From: Wim Ceulemans
Date:
Subject: Re: primary key question