]> granicus.if.org Git - postgresql/commit
Fix another bug in merging of inherited CHECK constraints.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 13 Oct 2016 21:05:14 +0000 (17:05 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 13 Oct 2016 21:05:14 +0000 (17:05 -0400)
commitf9e8b05e5f1c5eeaa963a9550ba6a592bdcb9a97
tree1bba38ad46f4a482ffd82dc22ada5ef848bc8660
parent2dd9e315d461b81258f4a575c916aba69c1d69c9
Fix another bug in merging of inherited CHECK constraints.

It's not good for an inherited child constraint to be marked connoinherit;
that would result in the constraint not propagating to grandchild tables,
if any are created later.  The code mostly prevented this from happening
but there was one case that was missed.

This is somewhat related to commit e55a946a8, which also tightened checks
on constraint merging.  Hence, back-patch to 9.2 like that one.  This isn't
so much because there's a concrete feature-related reason to stop there,
as to avoid having more distinct behaviors than we have to in this area.

Amit Langote

Discussion: <b28ee774-7009-313d-dd55-5bdd81242c41@lab.ntt.co.jp>
src/backend/catalog/heap.c
src/test/regress/expected/inherit.out
src/test/regress/sql/inherit.sql