pgsql: Fix inheritance count tracking in ALTER TABLE ..

From: rhaas(at)postgresql(dot)org (Robert Haas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix inheritance count tracking in ALTER TABLE ..
Date: 2010-08-03 15:47:09
Message-ID: 20100803154709.BFB567541D7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix inheritance count tracking in ALTER TABLE .. ADD CONSTRAINT.

Without this patch, constraints inherited by children of a parent
table which itself has multiple inheritance parents can end up with
the wrong coninhcount. After dropping the constraint, the children
end up with a leftover copy of the constraint that is not dumped
and cannot be dropped. There is a similar problem with ALTER TABLE
.. ADD COLUMN, but that looks significantly more difficult to
resolve, so I'm committing this fix separately.

Back-patch to 8.4, which is the first release that has coninhcount.

Report by Hank Enting.

Tags:
----
REL9_0_STABLE

Modified Files:
--------------
pgsql/src/backend/commands:
tablecmds.c (r1.332.2.2 -> r1.332.2.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.332.2.2&r2=1.332.2.3)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2010-08-03 15:47:16 pgsql: Fix inheritance count tracking in ALTER TABLE ..
Previous Message Robert Haas 2010-08-03 15:47:02 pgsql: Fix inheritance count tracking in ALTER TABLE ..