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

Поиск
Список
Период
Сортировка
От majid@apsalar.com
Тема BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns
Дата
Msg-id 20140313043900.398.17129@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      9555
Logged by:          Fazal Majid
Email address:      majid@apsalar.com
PostgreSQL version: 9.2.6
Operating system:   OpenIndiana b151 Solaris x64
Description:

Reproduction case:

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:

CREATE TABLE a (
    a integer,
    b integer,
    c integer
)
INHERITS (b);

and after pg_restore, the order of columns is inverted, as if the table
were:

CREATE TABLE a (
    a integer,
    c integer,
    b intege,
)

This causes things like unqualified INSERT INTO statements to start failing
(bad practice, I know).

The solution would be to generate CREATE TABLE followed by ALTER TABLE
INHERIT rather than CREATE TABLE ... INHERITS.

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

Предыдущее
От: Marko Tiikkaja
Дата:
Сообщение: Re: BUG #9557: Row not visible after receiving notification
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #9557: Row not visible after receiving notification