Adding PK to Existing Table

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Adding PK to Existing Table
Дата
Msg-id alpine.LNX.2.00.1104010835470.3160@salmo.appl-ecosys.com
обсуждение исходный текст
Ответы Re: Adding PK to Existing Table  (Raghavendra <raghavendra.rao@enterprisedb.com>)
Список 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 по дате отправления:

Предыдущее
От: pasman pasmański
Дата:
Сообщение: Convert xmin to format used by txid_current
Следующее
От: Raghavendra
Дата:
Сообщение: Re: Adding PK to Existing Table