converting unique index into primary key - Mailing list pgsql-general

From Ed L.
Subject converting unique index into primary key
Date
Msg-id 200412221657.20743.pgsql@bluepolka.net
Whole thread Raw
Responses Re: converting unique index into primary key  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I need to convert an existing unique index on a very heavily inserted table
into a primary key.  Alter table works, but locks the table for too long.
As a hack, can I just set pg_index.indisprimary = 't' and
pg_constraint.contype = 'p' for the appropriate row in each?  This is for
7.4.6 and 8.0beta3...

TIA...

Ed


pgsql-general by date:

Previous
From: Klint Gore
Date:
Subject: duplicate msgs when delivery through commandprompt.com
Next
From: Geoffrey
Date:
Subject: Re: What HW / OS is recommeded