Re: default index for primary key of a table - Mailing list pgsql-general

From Greg Stark
Subject Re: default index for primary key of a table
Date
Msg-id 87r7lfcv23.fsf@stark.xeocode.com
Whole thread Raw
In response to default index for primary key of a table  (Vinita.Bansal@trilogy.com)
List pgsql-general
Vinita.Bansal@trilogy.com writes:

> Postgres automatically creates index for Primary key of a table. I want to
> turn this off, so that the default index is not created for primary key.
> How can I do this??

Postgres does not support UNIQUE constraints (and PRIMARY KEY implies a UNIQUE
constraint) without an index. In Postgres the index is necessary to implement
the constraint.

In practice this doesn't usually cause any problem. Why do you want to do
this?

--
greg

pgsql-general by date:

Previous
From: "A. Mous"
Date:
Subject: Re: 8.0 Beta3 worked, RC1 didn't!
Next
From: "Josh Berkus"
Date:
Subject: Re: [sfpug] Basic problem installing TSearch2 (full text