Skip site navigation (1) Skip section navigation (2)

Re: Problem with dump/restore and inheritance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Dunlop <chris(at)onthe(dot)net(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Problem with dump/restore and inheritance
Date: 2006-02-22 15:11:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Chris Dunlop <chris(at)onthe(dot)net(dot)au> writes:
> E.g. using the script below, the 'bar.f1' column in the 'new'
> database ends up with a 'not null' constraint that isn't present
> in the 'orig' database.

>   create table foo (f1 integer not null);
>   create table bar () inherits(foo);
>   alter table bar alter column f1 drop not null;

The general consensus is that the above should be illegal, ie, the ALTER
should have been rejected.  Otherwise you would have a situation where a
"SELECT FROM foo" could return nulls, violating the very clear contract
of that table.  We have not got around to enforcing this yet, but it's
on the TODO.  I don't see it as a pg_dump bug that it's unable to
reproduce an invalid situation.

			regards, tom lane

In response to


pgsql-bugs by date

Next:From: Chris DunlopDate: 2006-02-22 22:48:44
Subject: Re: Problem with dump/restore and inheritance
Previous:From: Richard HuxtonDate: 2006-02-22 13:17:47
Subject: Re: Pg-restore

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group