pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: degtyaryov@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #12946: pg_dump/pg_restore not restore data for inherit tables
Date: Thu, 02 Apr 2015 09:49:50 -0400
Message-ID: <8169.1427982590@sss.pgh.pa.us> (raw)
In-Reply-To: <20150402123644.2573.95526@wrigleys.postgresql.org>
References: <20150402123644.2573.95526@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
view thread (4+ messages) latest in thread
Message-ID: <8169.1427982590@sss.pgh.pa.us> Permalink: ../8169.1427982590@sss.pgh.pa.us/ Also on: postgresql.org/message-id/8169.1427982590@sss.pgh.pa.us ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-bugs@postgresql.org Cc: tgl@sss.pgh.pa.us, degtyaryov@gmail.com Subject: Re: BUG #12946: pg_dump/pg_restore not restore data for inherit tables In-Reply-To: <8169.1427982590@sss.pgh.pa.us> References: <20150402123644.2573.95526@wrigleys.postgresql.org> <8169.1427982590@sss.pgh.pa.us> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox