Re: Bug in 8.2 (&8.1) dump & restore

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug in 8.2 (&8.1) dump & restore
Дата
Msg-id 26459.1167942751@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bug in 8.2 (&8.1) dump & restore  (Scott Ribe <scott_ribe@killerbytes.com>)
Список pgsql-general
Scott Ribe <scott_ribe@killerbytes.com> writes:
> create database test;
> \c test
> create table base (foo int not null);
> create table derived () inherits (base);
> alter table derived alter foo drop not null;
> insert into derived values(null);

> Dump it, and the dump will not include any command to drop the not null
> constraint on derived.foo, so restore will fail.

Actually, the bug there is that ALTER TABLE lets you set up a
self-inconsistent inheritance hierarchy.  The above should be illegal
because it would mean that "select foo from base" could return nulls,
contradicting the clear definition of the table.

We've been talking about fixing that, but it'll probably take catalog
changes (to be able to track which constraints were inherited from a
parent table) so this isn't ever going to be enforced by any existing
release.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Any form of connection-level "session variable" ?
Следующее
От: John McCawley
Дата:
Сообщение: Re: Any form of connection-level "session variable" ?