Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B3183476078 for ; Sat, 25 Jan 2003 21:44:12 -0500 (EST) Received: from mail2.tpgi.com.au (mail.tpgi.com.au [203.12.160.58]) by postgresql.org (Postfix) with ESMTP id 37D1B4767AA for ; Sat, 25 Jan 2003 21:29:13 -0500 (EST) Received: from jac (bri-ts7-2600-036.tpgi.com.au [203.219.30.36]) by mail2.tpgi.com.au (8.11.6/8.11.6) with SMTP id h0Q2TDR22536 for ; Sun, 26 Jan 2003 13:29:13 +1100 Message-ID: <000901c2c4e2$b7a1ea50$1400a8c0@jac> From: "jack" To: References: <20030124071239.T30220-100000@megazone23.bigpanda.com> Subject: Re: quastions about primary key Date: Sun, 26 Jan 2003 12:29:12 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/410 X-Sequence-Number: 11275 I try use uique instead of primary key. And it works, it allows null values. Is there any other difference between primary key and unique? Jack ----- Original Message ----- From: "Stephan Szabo" To: "jack" Cc: Sent: Saturday, January 25, 2003 1:14 AM Subject: Re: [SQL] quastions about primary key > On Fri, 24 Jan 2003, jack wrote: > > > Is that possible to have a two columns primary key on a table with null > > value on second column? > > No, because primary key implies not null on all columns involved > (technically I think it's that a non-deferrable primary key implies > not null on all columns involved, but we don't support deferrable ones) > >