Re: BUG #11381: Inherited NOT NULL to NULLABLE column: backup restore error.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #11381: Inherited NOT NULL to NULLABLE column: backup restore error.
Дата
Msg-id 2680.1410191279@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #11381: Inherited NOT NULL to NULLABLE column: backup restore error.  (m.winkel@w2solutions.nl)
Список pgsql-bugs
m.winkel@w2solutions.nl writes:
> CREATE TABLE base
> (
>   id serial NOT NULL,
>   name character varying(127) NOT NULL,
>   nickname character varying(127) NOT NULL,
>   email_address character varying(512) NOT NULL,
>   useless_but_required_field text NOT NULL,
>   CONSTRAINT base_pkey PRIMARY KEY (id)
> )
> WITH (
>   OIDS=FALSE
> );

> CREATE TABLE inherited
> (
>   CONSTRAINT inherited_pkey PRIMARY KEY (id)
> )
> INHERITS (base)
> WITH (
>   OIDS=FALSE
> );

> ALTER TABLE inherited
>    ALTER COLUMN useless_but_required_field DROP NOT NULL;

IMO this should definitely be disallowed.  But we lack the catalog
infrastructure to do so conveniently.  There has been some work
towards representing NOT NULL constraints more like CHECK constraints,
which do have the required infrastructure.  Once that's finished,
you'll probably see this be rejected.  There's not much point in
trying to make pg_dump cope with it, I think.

            regards, tom lane

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

Предыдущее
От: m.winkel@w2solutions.nl
Дата:
Сообщение: BUG #11381: Inherited NOT NULL to NULLABLE column: backup restore error.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #10528: MAC OS X was renamed