pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: omid omoomi <oomoomi@hotmail.com>
To: carolyn@kss.net.au
To: pgsql-sql@postgresql.org
Subject: Re: primary key question
Date: Thu, 20 Jul 2000 14:03:27 GMT
Message-ID: <LAW-F186CH5n00zepDI00000af3@hotmail.com> (raw)




>From: Carolyn Lu Wong <carolyn@kss.net.au>
>To: "pgsql-sql@postgresql.org" <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




view thread (4+ messages)  latest in thread

Message-ID: <LAW-F186CH5n00zepDI00000af3@hotmail.com>
Permalink:  ../LAW-F186CH5n00zepDI00000af3@hotmail.com/
Also on:    postgresql.org/message-id/LAW-F186CH5n00zepDI00000af3@hotmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: oomoomi@hotmail.com, carolyn@kss.net.au
  Subject: Re: primary key question
  In-Reply-To: <LAW-F186CH5n00zepDI00000af3@hotmail.com>
  References: <LAW-F186CH5n00zepDI00000af3@hotmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox