Re: Add primary and unique keys

Поиск
Список
Период
Сортировка
От Joel Burton
Тема Re: Add primary and unique keys
Дата
Msg-id Pine.LNX.4.21.0106181818490.32664-100000@olympus.scw.org
обсуждение исходный текст
Список pgsql-general
On Mon, 18 Jun 2001, Riaan van Jaarsveld wrote:

> I have read your article at
> http://techdocs.postgresql.org/techdocs/updatingcolumns.php and I also read
> that PostgreSQL does not support the "add column PRIMARY KEY UNIQUE"
> statement.
>
> I then used this function to create the unique key in a column "CREATE
> UNIQUE INDEX pers_pkey ON pers ( id );"
> but how does one then create the primary key for an existing field?

AFAIK, a primary key in PG is just a unique index that
is named tablename_pkey.

--
Joel Burton   <jburton@scw.org>
Director of Information Systems, Support Center of Washington


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: General Security-Question
Следующее
От: John Holland
Дата:
Сообщение: Re: General Security-Question