Re: PRIMARY KEY on a *group* of columns imply that each column is NOT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PRIMARY KEY on a *group* of columns imply that each column is NOT
Дата
Msg-id 21937.1114611990@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PRIMARY KEY on a *group* of columns imply that each column is NOT  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
Ответы Re: PRIMARY KEY on a *group* of columns imply that each column is NOT  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
Список pgsql-general
Stephane Bortzmeyer <bortzmeyer@nic.fr> writes:
> Yes, PostgreSQL is right and implement the standard. Now, what's the
> rationale for the standard? I understand it for a single column but,
> for several columns, it should be still possible to have different
> tuples, such as (3, NULL) and (5, NULL) for instance.

If that's what you want, declare it as UNIQUE not PRIMARY KEY.

            regards, tom lane

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

Предыдущее
От: Stephane Bortzmeyer
Дата:
Сообщение: Re: PRIMARY KEY on a *group* of columns imply that each column is NOT
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: PRIMARY KEY on a *group* of columns imply that each