Re: default index for primary key of a table

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: default index for primary key of a table
Date: 2004-12-24 20:15:00
Message-ID: 87r7lfcv23.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Vinita(dot)Bansal(at)trilogy(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Alex 2004-12-25 09:31:56 database permissions:how to create read only user for db
Previous Message John Jensen 2004-12-24 17:51:58 Re: i need it

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2004-12-24 21:24:59 Re: [sfpug] Basic problem installing TSearch2 (full text
Previous Message zz74 2004-12-24 19:39:55 win32 installer problem