Re: BUG #13656: table inheritance, pg_dump emits same constraint for all inheritors causing errors

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: swingi(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13656: table inheritance, pg_dump emits same constraint for all inheritors causing errors
Date: 2015-10-01 18:49:37
Message-ID: 23590.1443725377@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

swingi(at)gmail(dot)com writes:
> I just noticed that when you add a not valid constraint to a table that is
> inherited, this will result in pg_dump emitting an add constraint operation
> for every table in the inheritance hierarchy. Therefore restoring a dump
> will cause errors. Below is an example, first with a valid constraint (goes
> well), and then the not valid constraint.

Seems to be a simple oversight in the code for handling not-valid
constraints. Thanks for the report!

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message cpacejo 2015-10-01 18:51:44 BUG #13660: serializable snapshotting hangs
Previous Message Josh Berkus 2015-10-01 18:48:43 Re: GRANT USAGE ON SEQUENCE missing from psql command completion