Primary key on existing table? - Mailing list pgsql-admin

From Carol Walter
Subject Primary key on existing table?
Date
Msg-id B23364E3-51F5-49D2-AF36-83E2246D9FE6@indiana.edu
Whole thread Raw
Responses Re: Primary key on existing table?  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Primary key on existing table?  (Ries van Twisk <pg@rvt.dds.nl>)
Re: Primary key on existing table?  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: Primary key on existing table?  (Patrick <flymooney@gmail.com>)
List pgsql-admin
This may be a silly question but I don't see any place where the
documentation explicitly addresses whether or not you can designate a
particular column as a primary key after the table is created.  I used
the "create table as " syntax to create a table with the same columns
as an original table, but I want to rename id column, make it a
serial, and designate it as a primary key.  Is it possible to do
this?  I've tried a number of things to do this and none of them have
worked.

Carol

pgsql-admin by date:

Previous
From: james bardin
Date:
Subject: Re: warm standby and reciprocating failover.
Next
From: "Kevin Grittner"
Date:
Subject: Re: Primary key on existing table?