Re: BUG #16386: drop contraint in inherited table is missing inpg_dump backup

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: BUG #16386: drop contraint in inherited table is missing inpg_dump backup
Дата
Msg-id CAH503wB4v5DKG1hdjJUeBDzzWmKMFYMJRADmoW6-NfOteedF+w@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #16386: drop contraint in inherited table is missing in pg_dump backup  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16386: drop contraint in inherited table is missing inpg_dump backup  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-bugs
On Fri, 24 Apr 2020 at 07:09, PG Bug reporting form <noreply@postgresql.org> wrote:

create table b (aaa int primary key,bb date );
create table A (id int primary key) inherits (B);
alter table a alter column aaa drop not null;

after i made pg_dump and pg_restore the not null contraint isexist on table
a;

It does not make sense to exclude a not null constraint on an inherited table because column "aaa" can be null in table "a" but a SELECT in table "b" will return a NULL for a primary key (ugh). It is just one of the ways to shoot yourself in the foot. If you check CREATE TABLE synopsis, there isn't NO INHERIT for not null constraints. Maybe it is worth adding a note in CREATE TABLE.


--
Euler Taveira                 http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

Предыдущее
От: Jehan-Guillaume de Rorthais
Дата:
Сообщение: Re: [BUG] non archived WAL removed during production crash recovery
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #16386: drop contraint in inherited table is missing inpg_dump backup