From: Greg Stark <gsstark@mit.edu>
To: pgsql-general@postgresql.org
Subject: Re: default index for primary key of a table
Date: 24 Dec 2004 15:15:00 -0500
Message-ID: <87r7lfcv23.fsf@stark.xeocode.com> (raw)
In-Reply-To: <OFA1A0B8BB.1A510F75-ON86256F72.0049798F@trilogy.com>
References: <OFA1A0B8BB.1A510F75-ON86256F72.0049798F@trilogy.com>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: gsstark@mit.edu, pgsql-general@postgresql.org
Subject: Re: default index for primary key of a table
In-Reply-To: <87r7lfcv23.fsf@stark.xeocode.com>
References: <OFA1A0B8BB.1A510F75-ON86256F72.0049798F@trilogy.com> <87r7lfcv23.fsf@stark.xeocode.com>
* 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