primary key question

From: Carolyn Lu Wong <carolyn(at)kss(dot)net(dot)au>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: primary key question
Date: 2000-07-20 07:26:30
Message-ID: 3976A9A6.55E6BE2E@kss.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Wim Ceulemans 2000-07-20 07:45:31 Re: primary key question
Previous Message Carolyn Lu Wong 2000-07-20 06:13:20 from not null field to nullable field?