converting unique index into primary key

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: converting unique index into primary key
Date: 2004-12-22 23:57:20
Message-ID: 200412221657.20743.pgsql@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Geoffrey 2004-12-23 00:55:05 Re: What HW / OS is recommeded
Previous Message Klint Gore 2004-12-22 23:09:48 duplicate msgs when delivery through commandprompt.com