Setting primary key on existing table

Поиск
Список
Период
Сортировка
От Doug Silver
Тема Setting primary key on existing table
Дата
Msg-id 200209250953.17875.dsilver@urchin.com
обсуждение исходный текст
Ответы Re: Setting primary key on existing table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgcrypto?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Setting primary key on existing table