> I'm wondering if this represents some sort of out-of-sync condition
> between the table and its child tables.
regression=# create table p(f1 int);
regression=# create table c1(extra smallint) inherits(p);
regression=# alter table p add column f2 int;
regression=# insert into c1 values(1,2,3);
INSERT 0 1
regression=# alter table p alter column f2 type bigint using f2::bigint;
ERROR: attribute 2 has wrong type
DETAIL: Table has type smallint, but query expects integer.
Of course, in c1 the target column is #3 not #2. The USING expression
isn't being adjusted for the discrepancy between parent and child column
This test case works before 9.5; somebody must have broke it while
regards, tom lane
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: