Re: Bug in ALTER COLUMN SET DATA TYPE ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nikhil Sontakke <nikkhils(at)gmail(dot)com>
Cc: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in ALTER COLUMN SET DATA TYPE ?
Date: 2012-11-02 15:30:22
Message-ID: 28050.1351870222@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nikhil Sontakke <nikkhils(at)gmail(dot)com> writes:
>> Hmm.. I haven't yet tested on other branches. But I'm surprised that you
>> find it broken on so much old branches. "git annotate" suggests that the
>> offending error message was added by commit
>> 09ff76fcdb275769ac4d1a45a67416735613d04b and that commit is dated Apr 20,
>> 2012

> Mea Culpa. I did indeed add that error message. But it's strange when Tom
> says that this is broken since 8.3!

In the 8.4 branch, the error is coming from here:

regression=# \set VERBOSITY verbose
regression=# ALTER TABLE test ALTER COLUMN a TYPE numeric;
ERROR: 42P16: constraint must be added to child tables too
LOCATION: ATAddCheckConstraint, tablecmds.c:4467

which appears to have been added in commit cd902b331. I think the
commit Pavan is looking at just moved the logic around.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2012-11-02 15:34:18 Re: Proposal for Allow postgresql.conf values to be changed via SQL
Previous Message Nikhil Sontakke 2012-11-02 15:16:23 Re: Bug in ALTER COLUMN SET DATA TYPE ?