Adding PK to Existing Table - Mailing list pgsql-general

From Rich Shepard
Subject Adding PK to Existing Table
Date
Msg-id alpine.LNX.2.00.1104010835470.3160@salmo.appl-ecosys.com
Whole thread Raw
Responses Re: Adding PK to Existing Table
List pgsql-general
   In -9.0.3 I used ALTER TABLE to replace a varchar() column with a bigint
column so it can be assigned as the table's primary key. From the 9.0.3
manual I tried various flavors of ALTER TABLE <tablename> ADD CONSTRAINT but
cannot find the proper syntax to create the PK. Do I need to first make the
column UNIQUE, then add a NOT NULL constraint?

Rich

pgsql-general by date:

Previous
From: pasman pasmański
Date:
Subject: Convert xmin to format used by txid_current
Next
From: Raghavendra
Date:
Subject: Re: Adding PK to Existing Table