From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix handling of inherited check constraints in ALTER COLUMN TYPE
Date: Mon, 05 Nov 2012 18:37:05 +0000
Message-ID: <E1TVRXl-0006rs-OX@gemulon.postgresql.org> (raw)
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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/5ed6546cf75623ba426942a3b71659a66cf7ed68
Modified Files
--------------
src/backend/commands/tablecmds.c | 43 ++++++++++++++++++++++-------
src/include/nodes/parsenodes.h | 1 +
src/test/regress/expected/alter_table.out | 22 +++++++++++++++
src/test/regress/sql/alter_table.sql | 7 +++++
4 files changed, 63 insertions(+), 10 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix handling of inherited check constraints in ALTER COLUMN TYPE
In-Reply-To: <E1TVRXl-0006rs-OX@gemulon.postgresql.org>
References: <E1TVRXl-0006rs-OX@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox