Re: Question about Indexes... - Mailing list pgsql-novice

From Tom Lane
Subject Re: Question about Indexes...
Date
Msg-id 21479.1073148750@sss.pgh.pa.us
Whole thread Raw
In response to Question about Indexes...  ("Alan T. Miller" <amiller@hollywood101.com>)
List pgsql-novice
"Alan T. Miller" <amiller@hollywood101.com> writes:
> If I create a table and assign the column type for what will be the primary
> key the value of "Serial", do I need to explicitly create an index in
> addition?

Either PRIMARY KEY or UNIQUE implies an index (for any column datatype).
They even put out notices to tell you so.

> I was thinking that a Serial, would automatically be a Unique Index wouldn't
> it?

Not in recent releases --- a SERIAL column is just an integer with a
special default value.

            regards, tom lane

pgsql-novice by date:

Previous
From: Aarni Ruuhimäki
Date:
Subject: Re: Question about Indexes...
Next
From: Andreas
Date:
Subject: Re: Question about Indexes...