Re: Multiple inheritance and ALTER TABLE issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Manuel Rigger <rigger(dot)manuel(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Multiple inheritance and ALTER TABLE issue
Date: 2019-08-18 21:13:20
Message-ID: 619.1566162800@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> Manuel Rigger <rigger(dot)manuel(at)gmail(dot)com> writes:
>> Consider the test case below:

>> CREATE TABLE t0(c0 boolean);
>> CREATE TABLE t1(c0 boolean);
>> CREATE TABLE t2(c0 boolean) INHERITS(t0, t1);
>> ALTER TABLE t0 ALTER c0 TYPE TEXT;
>> UPDATE t1 SET c0 = TRUE; -- ERROR: attribute "c0" of relation "t2"
>> does not match parent's type

>> Is this behavior intended?

> Hm. I would say that the ALTER COLUMN TYPE operation should have thrown
> an error instead of trying to change the type of a multiply-inherited
> column. As you say, no good can come of that.

I've pushed a fix along that line. Thanks for the report!

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2019-08-19 02:59:54 Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclared identifier 'FD_SETSIZE'
Previous Message Magnus Hagander 2019-08-18 16:00:41 Re: BUG #15951: http://www.postgresql.sk/support/submitbug not working