From: Ragnar Hafstaư <gnari@simnet.is>
To: Sam Adams <samadams@myfastmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Serial and Index
Date: Sun, 27 Feb 2005 17:12:09 +0000
Message-ID: <1109524329.16688.38.camel@localhost.localdomain> (raw)
In-Reply-To: <1109508892.19366.216118816@webmail.messagingengine.com>
References: <1109508892.19366.216118816@webmail.messagingengine.com>
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
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gnari@simnet.is, samadams@myfastmail.com
Subject: Re: Serial and Index
In-Reply-To: <1109524329.16688.38.camel@localhost.localdomain>
* 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