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 DB82C56464 for ; Sun, 27 Feb 2005 17:10:01 +0000 (GMT) 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 82506-09 for ; Sun, 27 Feb 2005 17:09:52 +0000 (GMT) Received: from quasar.skima.is (quasar.skima.is [212.30.200.205]) by svr1.postgresql.org (Postfix) with ESMTP id E3B8656497 for ; Sun, 27 Feb 2005 17:09:56 +0000 (GMT) Received: from gnari ([157.157.175.249] [157.157.175.249]) by quasar.skima.is with ESMTP; Sun, 27 Feb 2005 17:10:07 Z Subject: Re: Serial and Index From: Ragnar =?ISO-8859-1?Q?Hafsta=F0?= To: Sam Adams Cc: pgsql-sql@postgresql.org In-Reply-To: <1109508892.19366.216118816@webmail.messagingengine.com> References: <1109508892.19366.216118816@webmail.messagingengine.com> Content-Type: text/plain Date: Sun, 27 Feb 2005 17:12:09 +0000 Message-Id: <1109524329.16688.38.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/341 X-Sequence-Number: 20451 On Sun, 2005-02-27 at 12:54 +0000, Sam Adams wrote: > I read at http://jamesthornton.com/postgres/FAQ/faq-english.html#4.15.1 > that when a serial is created then an index is created on the column. > However I can't seem to find this anywhere in the PoistgreSQL manual. Is > this true? Thanks. no, this is not true. howewer defining the serial column as UNIQUE will. test=# create table q2 (a serial unique,b text); NOTICE: CREATE TABLE will create implicit sequence "q2_a_seq" for "serial" column "q2.a" NOTICE: CREATE TABLE / UNIQUE will create implicit index "q2_a_key" for table "q2" CREATE TABLE test=# feel free to inform the webmaster of that site, that the FAQ has been updated since 2002. here is a more authoritative copy: http://www.postgresql.org/files/documentation/faqs/FAQ.html gnari