Re: BUG #4751: Incorrect pg_dump output when dropping not null in inherited table.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4751: Incorrect pg_dump output when dropping not null in inherited table.
Дата
Msg-id 10611.1239045246@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4751: Incorrect pg_dump output when dropping not null in inherited table.  ("Grzegorz Junka" <xgjx@poczta.onet.pl>)
Список pgsql-bugs
"Grzegorz Junka" <xgjx@poczta.onet.pl> writes:
> I don't know if these steps below are allowed, but documentation doesn't say
> anything that they are not.

> create table parent_table (someint integer not null);
> create table child_table (id integer) inherits (parent_table);
> alter table only child_table alter column someint drop not null;

This is not considered valid: the result would be that "select * from
parent_table" could show some null values of someint, which would be
unexpected given its constraint.  We are not currently enforcing that
but it will probably start being enforced in 8.5 or so.  (As of 8.4,
a similar rule for inherited check constraints *is* enforced.)

It's not really a pg_dump bug that it fails to cope with the case;
rather it's a backend bug that you can get into this state at all.

            regards, tom lane

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

Предыдущее
От: "Grzegorz Junka"
Дата:
Сообщение: BUG #4751: Incorrect pg_dump output when dropping not null in inherited table.
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: data loss with pg_standby when doing a controlled failover