Re: BUG #12946: pg_dump/pg_restore not restore data for inherit tables
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #12946: pg_dump/pg_restore not restore data for inherit tables |
| Дата | |
| Msg-id | 8169.1427982590@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BUG #12946: pg_dump/pg_restore not restore data for inherit tables (degtyaryov@gmail.com) |
| Ответы |
Re: BUG #12946: pg_dump/pg_restore not restore data for
inherit tables
|
| Список | pgsql-bugs |
degtyaryov@gmail.com writes:
> $ psql -U test -d test_inherits
> test_inherits=> create table t1(a integer not null, b integer);
> CREATE TABLE
> test_inherits=> create table t2(a integer, b integer) inherits (t1);
> CREATE TABLE
> test_inherits=> insert into t1(a,b) values(null,1);
> ERROR: null value in column "a" violates not-null constraint
> DETAIL: Failing row contains (null, 1).
> test_inherits=> insert into t2(a,b) values(null,1);
> INSERT 0 1
> test_inherits=> \q
[ scratches head... ] When I do that, it refuses to insert into t2
either:
regression=# create table t1(a integer not null, b integer);
CREATE TABLE
regression=# create table t2(a integer, b integer) inherits (t1);
NOTICE: merging column "a" with inherited definition
NOTICE: merging column "b" with inherited definition
CREATE TABLE
regression=# insert into t1(a,b) values(null,1);
ERROR: null value in column "a" violates not-null constraint
DETAIL: Failing row contains (null, 1).
regression=# insert into t2(a,b) values(null,1);
ERROR: null value in column "a" violates not-null constraint
DETAIL: Failing row contains (null, 1).
This is the behavior I would expect, and I see it in all active
branches. Have you modified the code around column inheritance?
regards, tom lane
В списке pgsql-bugs по дате отправления: