Re: NOT NULL Fixes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: NOT NULL Fixes
Дата
Msg-id 3008.1041536011@sss.pgh.pa.us
обсуждение исходный текст
Ответ на NOT NULL Fixes  (Rod Taylor <rbt@rbt.ca>)
Список pgsql-patches
Rod Taylor <rbt@rbt.ca> writes:
> Enforces NOT NULL constraints to be applied against new PRIMARY KEY
> columns in DefineIndex.  So, ALTER TABLE ... PRIMARY KEY will now
> automatically add the NOT NULL constraint.  It appeared the alter_table
> regression test wanted this to occur, as after the change the regression
> test better matched in inline 'fails'/'succeeds' comments.

Committed with a few editorializations.

> The NOT NULL clause will NOT cascade to children at the moment.  Perhaps
> this should be the other way around?

I left that as-is, but I'm dubious about it too.  Ordinarily you'd
expect a NOT NULL constraint on a parent table to propagate to children
as well.  OTOH, since the PRIMARY KEY constraint itself doesn't
propagate to children, arguably it's more consistent to act this way
(at least until we tackle cross-table indexes).

It's a one-liner code change if we want it to act the other way, so I
figure we can put the main fix in now and argue about this detail later.

            regards, tom lane

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

Предыдущее
От: "Serguei Mokhov"
Дата:
Сообщение: ru: translation updates -- backend and libpq
Следующее
От: "Serguei Mokhov"
Дата:
Сообщение: Re: [HACKERS] pg_dump.options.diff