primary key question

Поиск
Список
Период
Сортировка
От Carolyn Lu Wong
Тема primary key question
Дата
Msg-id 3976A9A6.55E6BE2E@kss.net.au
обсуждение исходный текст
Ответы RE: primary key question  (Pablo Niklas <pniklas@bigfoot.com>)
Список pgsql-sql
create table aaa(field1    .... not null,field2  ....,....,primary key (field1, field2)
);

Based on the above table definition, field2 allows null values. But
after the table created based on the above script, field2 becomes not
null. The only conclusion I come up with is setting the field as part of
the primary key, PostgreSQL automatically sets the field to not null. Or
is it something else?

Is this a feature or bug?


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

Предыдущее
От: Carolyn Lu Wong
Дата:
Сообщение: from not null field to nullable field?
Следующее
От: Wim Ceulemans
Дата:
Сообщение: Re: primary key question