Re: Adding another primary key to a populated table

Поиск
Список
Период
Сортировка
От Andrew - Supernews
Тема Re: Adding another primary key to a populated table
Дата
Msg-id slrndrrvfb.2iki.andrew+nonews@atlantis.supernews.net
обсуждение исходный текст
Ответ на Adding another primary key to a populated table  (Daniel Kunkel <DanielKunkel@BioWaves.com>)
Ответы Re: Adding another primary key to a populated table  (Daniel Kunkel <DanielKunkel@BioWaves.com>)
Список pgsql-general
On 2006-01-06, Daniel Kunkel <DanielKunkel@BioWaves.com> wrote:
> Hi
>
> I'm trying to add another primary key to a table populated with data and
> a number of foreign key constraints.

You can only have one primary key on a table.

You can add additional unique constraints to get the same effect. (A
primary key constraint is just a unique constraint that is also not null,
and is the default target for REFERENCES constraints referring to the table -
this last factor is why there can be only one...)

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Data loading from a flat file...
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Data loading from a flat file...