pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Panos Christeas <xrg@linux.gr>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6024: pg_dump won't dump ALTERed inherited fields
Date: Thu, 12 May 2011 11:24:13 -0400
Message-ID: <16597.1305213853@sss.pgh.pa.us> (raw)
In-Reply-To: <201105120914.p4C9ELvP076791@wwwmaster.postgresql.org>
References: <201105120914.p4C9ELvP076791@wwwmaster.postgresql.org>

"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



view thread (4+ messages)  latest in thread

Message-ID: <16597.1305213853@sss.pgh.pa.us>
Permalink:  ../16597.1305213853@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16597.1305213853@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, xrg@linux.gr
  Subject: Re: BUG #6024: pg_dump won't dump ALTERed inherited fields
  In-Reply-To: <16597.1305213853@sss.pgh.pa.us>
  References: <201105120914.p4C9ELvP076791@wwwmaster.postgresql.org> <16597.1305213853@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