pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeddefault index for primary key of a table
2+ messages / 2 participants
[nested] [flat]
* default index for primary key of a table
@ 2004-12-22 13:25 Vinita.Bansal@trilogy.com
0 siblings, 1 reply; 2+ messages in thread
From: Vinita.Bansal@trilogy.com @ 2004-12-22 13:25 UTC (permalink / raw)
To: pgsql-admin; pgsql-general@postgresql.org
Hi,
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??
Regards,
Vinita Bansal
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: default index for primary key of a table
@ 2004-12-24 20:15 Greg Stark <gsstark@mit.edu>
parent: Vinita.Bansal@trilogy.com
0 siblings, 0 replies; 2+ messages in thread
From: Greg Stark @ 2004-12-24 20:15 UTC (permalink / raw)
To: pgsql-general@postgresql.org
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-12-24 20:15 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-12-22 13:25 default index for primary key of a table Vinita.Bansal@trilogy.com
2004-12-24 20:15 ` Greg Stark <gsstark@mit.edu>
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