Setting primary key on existing table - Mailing list pgsql-novice

From Doug Silver
Subject Setting primary key on existing table
Date
Msg-id 200209250953.17875.dsilver@urchin.com
Whole thread Raw
Responses Re: Setting primary key on existing table
List pgsql-novice
I would like to be able to redefine a field in a table to be a foreign
reference -- however this field was initially defined as just "serial" and
not "serial primary key".  I tried to add that constraint to the table, but
it didn't work.  Do I need to copy out the table, drop it, and recreate it
with this constraint in order for it to be a foreign key?

Thanks
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Doug Silver
Network Manager
Urchin Software Corp.    http://www.urchin.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgcrypto?
Next
From: Tom Lane
Date:
Subject: Re: Setting primary key on existing table