majid@apsalar.com writes:
> create table A(a int, b int, c int);
> create table B(a int, c int);
> alter table A inherit B;
> pg_dump (whether in default or -Fc mode) generates [ A with a,c,b ]
This is not a bug, but expected and desired behavior. The parent's column
order is considered canonical, and child tables are made to append their
columns to that. Perhaps in your use-case that's not how you'd like to
think about it, but if we were to change this we'd doubtless break things
for other people.
Possibly you could use pg_upgrade, which I believe does preserve physical
column order in such cases.
regards, tom lane