From: | "omid omoomi" <oomoomi(at)hotmail(dot)com> |
---|---|
To: | carolyn(at)kss(dot)net(dot)au, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: primary key question |
Date: | 2000-07-20 14:03:27 |
Message-ID: | LAW-F186CH5n00zepDI00000af3@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
>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: [SQL] primary key question
>Date: Thu, 20 Jul 2000 17:26:30 +1000
>
>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?
Sure it is a feature , since the first integrity rule force the primary
key(s) to be not null automatically whether entirely or partially.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
From | Date | Subject | |
---|---|---|---|
Next Message | John | 2000-07-20 16:02:30 | Nested Aggregates? |
Previous Message | Emils Klotins | 2000-07-20 08:53:08 | test |