Diffrent column ordering after dump/restore tables with INHERITS - Mailing list pgsql-bugs

From Oleg Serov
Subject Diffrent column ordering after dump/restore tables with INHERITS
Date
Msg-id cec7c6df0907041310g6f408873je542d8b50bede065@mail.gmail.com
Whole thread Raw
Responses Re: Diffrent column ordering after dump/restore tables with INHERITS  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
If i have tables with inherits, and the
n i adding a column in to the base table, the new column will be at
the on of column list in child table, but when i done dump->restore i
have surprise,
Column ordering was changed.
Some example:

CREATE TABLE test_base (
    id INT
);
CREATE TABLE test_child_with_data (
    t TEXT
) INHERITS (test_base);

ALTER TABLE test_base ADD COLUMN date DATE;

INSERT INTO test_child_with_data
    SELECT 1, 'test', NOW(); -- works fine.

-- Dump/restore

INSERT INTO test_child_with_data
    SELECT 1, 'test', NOW(); -- error..

So, column ordering after dump, restore must be the same!
I don't know how to live with it, now i have on production-server
small db, and i can use dump/restore. but on other project
dump/restore takes 8 hours.. so, any ideas ?
More detailed how i use it
in one procedure
INSERT INTO test_child_with_data
    SELECT select_procedure();

select_procedure:
...
 SELECT 1, 'test', NOW()
      FROM...

pgsql-bugs by date:

Previous
From: Michal Szymanski
Date:
Subject: RETURN QUERY still does not work perfect in Postgres 8.4
Next
From: "Peter Headland"
Date:
Subject: BUG #4899: Open parenthesis breaks query plan