Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns
Дата
Msg-id 14563.1394718457@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns  (majid@apsalar.com)
Список pgsql-bugs
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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #9557: Row not visible after receiving notification
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns