X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6441F52A1A for ; Tue, 28 Jun 2005 14:01:18 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80618-08 for ; Tue, 28 Jun 2005 17:01:09 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id 055F852A14 for ; Tue, 28 Jun 2005 14:01:08 -0300 (ADT) Received: (qmail 3877 invoked from network); 28 Jun 2005 19:01:29 +0200 Received: from unknown (HELO localhost) (boutiquenumerique-lists@192.168.0.4) by boutiquenumerique.com with SMTP; 28 Jun 2005 19:01:29 +0200 To: orange_crush_068@hotmail.com, pgsql-sql@postgresql.org Subject: Re: Unique primary index? References: <1119530632.181638.4330@g49g2000cwa.googlegroups.com> Message-ID: Date: Tue, 28 Jun 2005 19:01:07 +0200 From: PFC Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <1119530632.181638.4330@g49g2000cwa.googlegroups.com> User-Agent: Opera M2(BETA2)/8.0 (Linux, build 987) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/339 X-Sequence-Number: 21940 index is... an index ! UNIQUE is an index which won't allow duplicate values (except for NULLS) PRIMARY KEY is exactly like UNIQUE NOT NULL, with the bonus that the database knows this column is the primary key so you can use stuff like NATURAL JOIN without telling which column you want to use. > > What are the major differences between Unique, primary index & just > plain index? > > When creating tables I nominate one of these, but not sure what the > difference is? > > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend >