Recreating a primary key

Ericson Smith <eric@did-it.com>

From: Ericson Smith <eric@did-it.com>
To: Postgresql General <pgsql-general@postgresql.org>
Date: 2003-02-28T16:47:54Z
Lists: pgsql-general
Hi,

Is there a way to re-create a primary key?

So I create tables with CREATE TABLE... PRIMARY KEY(col...) syntax. 

I later want to drop the primary key and re-create it (performance
considerations, and to not worry about exclusive table locking with a
rebuild index). 

The documentation says that primary keys are basically UNIQUE and NOT
NULL keys, but checking with pg_index, I see the "indisprimary" column
is set to true.

Any quick and dirty way to rebuild these indices?


-- 
Ericson Smith <eric@did-it.com>