Received: from hotmail.com (law-f186.hotmail.com [209.185.131.249]) by hub.org (8.10.1/8.10.1) with ESMTP id e6KE3Yh07500 for ; Thu, 20 Jul 2000 10:03:34 -0400 (EDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 20 Jul 2000 07:03:28 -0700 Received: from 213.29.16.2 by lw1fd.hotmail.msn.com with HTTP; Thu, 20 Jul 2000 GMT X-Originating-IP: [213.29.16.2] From: "omid omoomi" To: carolyn@kss.net.au, pgsql-sql@postgresql.org Subject: Re: primary key question Date: Thu, 20 Jul 2000 14:03:27 GMT Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 20 Jul 2000 14:03:28.0263 (UTC) FILETIME=[47551970:01BFF253] X-Archive-Number: 200007/193 >From: Carolyn Lu Wong >To: "pgsql-sql@postgresql.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