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 11:37:05 -0400
Message-ID: <10870.1427989025@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFcrtwGu0+aOx4QbWE5iAtOfUZH6BGoX6+-5O4FhKzNPU+GfGg@mail.gmail.com>
References: <20150402123644.2573.95526@wrigleys.postgresql.org>
<8169.1427982590@sss.pgh.pa.us>
<CAFcrtwGu0+aOx4QbWE5iAtOfUZH6BGoX6+-5O4FhKzNPU+GfGg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
=?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JTQtdCz0YLRj9GA0ZHQsg==?= <degtyaryov@gmail.com> writes:
> However, in accordance with the documentation
> http://www.postgresql.org/docs/9.4/static/ddl-inherit.html(quote: "It must
> also include check constraints with the same names and check expressions as
> those of the parent."),
> alter table t2 alter column a drop not null;
> the result must be a error.
Ah. Yeah, that's a known issue: NOT NULL constraints don't currently have
enough infrastructure for ALTER TABLE to realize whether they're inherited
or not. The system should indeed prevent you from doing DROP NOT NULL
here, but it doesn't. I think there's an item for that on the TODO list.
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
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: <10870.1427989025@sss.pgh.pa.us>
References: <20150402123644.2573.95526@wrigleys.postgresql.org> <8169.1427982590@sss.pgh.pa.us> <CAFcrtwGu0+aOx4QbWE5iAtOfUZH6BGoX6+-5O4FhKzNPU+GfGg@mail.gmail.com> <10870.1427989025@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