Re: how to set more than two attributes as primary keys in a table

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: how to set more than two attributes as primary keys in a table
Дата
Msg-id 20031229172128.GB9888@wolff.to
обсуждение исходный текст
Ответ на Re: how to set more than two attributes as primary keys in a table  (Casey Allen Shobe <cshobe@softhome.net>)
Ответы Re: how to set more than two attributes as primary keys in a table
Список pgsql-novice
On Mon, Dec 29, 2003 at 12:09:01 -0500,
  Casey Allen Shobe <cshobe@softhome.net> wrote:
> Bruno Wolff III (Monday 29 December 2003 12:14)
> > Note that isn't quite the same unless you add NOT NULL constraints for
> > foo and bar.
>
> Oops!  You're right, and the ID column needs a 'not null' as well.  I just
> typed that in a hurry and forgot.  Sorry.

A primary key constraint implies both unique and not null, so you don't
need to use NOT NULL on the ID column.

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

Предыдущее
От: Casey Allen Shobe
Дата:
Сообщение: Re: how to set more than two attributes as primary keys in a table
Следующее
От: Casey Allen Shobe
Дата:
Сообщение: Re: how to set more than two attributes as primary keys in a table