Re: Problem with dump/restore and inheritance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with dump/restore and inheritance
Дата
Msg-id 11787.1140621111@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problem with dump/restore and inheritance  (Chris Dunlop <chris@onthe.net.au>)
Ответы Re: Problem with dump/restore and inheritance  (Chris Dunlop <chris@onthe.net.au>)
Список pgsql-bugs
Chris Dunlop <chris@onthe.net.au> writes:
> E.g. using the script below, the 'bar.f1' column in the 'new'
> database ends up with a 'not null' constraint that isn't present
> in the 'orig' database.

>   create table foo (f1 integer not null);
>   create table bar () inherits(foo);
>   alter table bar alter column f1 drop not null;

The general consensus is that the above should be illegal, ie, the ALTER
should have been rejected.  Otherwise you would have a situation where a
"SELECT FROM foo" could return nulls, violating the very clear contract
of that table.  We have not got around to enforcing this yet, but it's
on the TODO.  I don't see it as a pg_dump bug that it's unable to
reproduce an invalid situation.

            regards, tom lane

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Pg-restore
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Problem with dump/restore and inheritance