Primary key on existing table?

From: Carol Walter <walterc(at)indiana(dot)edu>
To: pgsql-admin(at)postgresql(dot)org
Subject: Primary key on existing table?
Date: 2009-08-25 20:25:07
Message-ID: B23364E3-51F5-49D2-AF36-83E2246D9FE6@indiana.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2009-08-25 21:55:57 Re: Primary key on existing table?
Previous Message james bardin 2009-08-24 15:34:18 Re: warm standby and reciprocating failover.