pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #6024: pg_dump won't dump ALTERed inherited fields
4+ messages / 4 participants
[nested] [flat]
* BUG #6024: pg_dump won't dump ALTERed inherited fields
@ 2011-05-12 09:14 Panos Christeas <xrg@linux.gr>
0 siblings, 1 reply; 4+ messages in thread
From: Panos Christeas @ 2011-05-12 09:14 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged online:
Bug reference: 6024
Logged by: Panos Christeas
Email address: xrg@linux.gr
PostgreSQL version: 9.0, 8.4
Operating system: Linux
Description: pg_dump won't dump ALTERed inherited fields
Details:
CREATE TABLE test1(
id SERIAL PRIMARY KEY,
name VARCHAR(20) NOT NULL
);
CREATE TABLE test2(
description TEXT
) INHERITS(test1);
ALTER TABLE test2 ALTER name DROP NOT NULL;
pg_dump that.
The dump will still have "not null" constraint at test2.name.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #6024: pg_dump won't dump ALTERed inherited fields
@ 2011-05-12 15:24 Tom Lane <tgl@sss.pgh.pa.us>
parent: Panos Christeas <xrg@linux.gr>
0 siblings, 2 replies; 4+ messages in thread
From: Tom Lane @ 2011-05-12 15:24 UTC (permalink / raw)
To: Panos Christeas <xrg@linux.gr>; +Cc: pgsql-bugs
"Panos Christeas" <xrg@linux.gr> writes:
> CREATE TABLE test1(
> id SERIAL PRIMARY KEY,
> name VARCHAR(20) NOT NULL
> );
> CREATE TABLE test2(
> description TEXT
> ) INHERITS(test1);
> ALTER TABLE test2 ALTER name DROP NOT NULL;
> pg_dump that.
> The dump will still have "not null" constraint at test2.name.
This isn't really a pg_dump deficiency. The bug is that we let you do
that ALTER. Inherited constraints shouldn't be droppable, and indeed
are not droppable except in the single case of NOT NULL. This is on the
to-fix list --- in fact there was a patch submitted for it last year,
although it got returned for rework and we've not seen it again yet.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #6024: pg_dump won't dump ALTERed inherited fields
@ 2011-05-12 16:32 P. Christeas <p_christ@hol.gr>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 4+ messages in thread
From: P. Christeas @ 2011-05-12 16:32 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs
On Thursday 12 May 2011, you wrote:
> "Panos Christeas" <xrg@linux.gr> writes:
> > CREATE TABLE test1(id SERIAL PRIMARY KEY,
> > name VARCHAR(20) NOT NULL);
> > CREATE TABLE test2(description TEXT) INHERITS(test1);
> > ALTER TABLE test2 ALTER name DROP NOT NULL;
> >
> > pg_dump that.
> > The dump will still have "not null" constraint at test2.name.
>
> This isn't really a pg_dump deficiency. The bug is that we let you do
> that ALTER. Inherited constraints shouldn't be droppable, and indeed
> are not droppable except in the single case of NOT NULL. This is on the
> to-fix list --- in fact there was a patch submitted for it last year,
> although it got returned for rework and we've not seen it again yet.
>
That's fine for me. Just as long as pg_dump is consistent* with what the schema
can be.
Perhaps, some errata or warning in the documentation would do, too. (is there
any, already? )
* however, do consider that old servers will still be able to hold such
inconsistent (I admit it) data; we can't apply that behavior to them.
--
Say NO to spam and viruses. Stop using Microsoft Windows!
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #6024: pg_dump won't dump ALTERed inherited fields
@ 2011-05-12 22:08 Bernd Helmle <mailings@oopsware.de>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 4+ messages in thread
From: Bernd Helmle @ 2011-05-12 22:08 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Panos Christeas <xrg@linux.gr>; +Cc: pgsql-bugs
--On 12. Mai 2011 11:24:13 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote:
> This is on the
> to-fix list --- in fact there was a patch submitted for it last year,
> although it got returned for rework and we've not seen it again yet.
Yes, I didn't manage to provide a completed patch for 9.1...will try to
re-submit for 9.2, it's on my radar again.
--
Thanks
Bernd
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2011-05-12 22:08 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-05-12 09:14 BUG #6024: pg_dump won't dump ALTERed inherited fields Panos Christeas <xrg@linux.gr>
2011-05-12 15:24 ` Tom Lane <tgl@sss.pgh.pa.us>
2011-05-12 16:32 ` P. Christeas <p_christ@hol.gr>
2011-05-12 22:08 ` Bernd Helmle <mailings@oopsware.de>
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