Re: Recreating a primary key

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ericson Smith <eric(at)did-it(dot)com>
Cc: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Recreating a primary key
Date: 2003-02-28 20:08:26
Message-ID: 5959.1046462906@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ericson Smith <eric(at)did-it(dot)com> writes:
> Is there a way to re-create a primary key?

In 7.3, there's ALTER TABLE ADD PRIMARY KEY. In earlier releases,
you'd have to fake it by manually poking pg_index.indisprimary
after you create a unique index.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-02-28 20:10:10 Re: Locking rows
Previous Message Tom Lane 2003-02-28 20:07:07 Re: Some useful plpgsl