]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix handling of inherited check constraints in ALTER COLUMN TYPE.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 5 Nov 2012 18:36:31 +0000 (13:36 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 5 Nov 2012 18:36:31 +0000 (13:36 -0500)
commit8e344eacdccc3c069974cba61af42be60e50c764
treeb5285ae24eec5b577dc680146273bfa3456f949f
parentd997bd2c50c15b8e33b02004e580f68e29a610a6
Fix handling of inherited check constraints in ALTER COLUMN TYPE.

This case got broken in 8.4 by the addition of an error check that
complains if ALTER TABLE ONLY is used on a table that has children.
We do use ONLY for this situation, but it's okay because the necessary
recursion occurs at a higher level.  So we need to have a separate
flag to suppress recursion without making the error check.

Reported and patched by Pavan Deolasee, with some editorial adjustments by
me.  Back-patch to 8.4, since this is a regression of functionality that
worked in earlier branches.
src/backend/commands/tablecmds.c
src/include/nodes/parsenodes.h
src/test/regress/expected/alter_table.out
src/test/regress/sql/alter_table.sql