On 2015-09-16 22:18:55 -0700, Michael Paquier wrote: > So, here we go. Cool.
> I have found something quite interesting when playing with the patch > attached: dump does not guarantee the column ordering across databases > for some inherited tables, see that example from the main regression > test suite the following diff between a dump taken from a source > database and a target database where the source dump has been restored > in first: > -INSERT INTO b_star (class, aa, bb, a) VALUES ('b', 3, 'mumble', NULL); > -INSERT INTO b_star (class, aa, bb, a) VALUES ('b', 4, NULL, NULL); > -INSERT INTO b_star (class, aa, bb, a) VALUES ('b', NULL, 'bumble', NULL); > -INSERT INTO b_star (class, aa, bb, a) VALUES ('b', NULL, NULL, NULL); > +INSERT INTO b_star (class, aa, a, bb) VALUES ('b', 3, NULL, 'mumble'); > +INSERT INTO b_star (class, aa, a, bb) VALUES ('b', 4, NULL, NULL); > +INSERT INTO b_star (class, aa, a, bb) VALUES ('b', NULL, NULL, 'bumble'); > +INSERT INTO b_star (class, aa, a, bb) VALUES ('b', NULL, NULL, NULL); > > Problem is similar with --column-inserts, --inserts and COPY. We could > use --exclude-table like in the patch attached when taking the dump > from source database but that's grotty, or we could improve pg_dump > itself, though it may not be worth it for just this purpose. > Thoughts? Hm. To me that sounds like a moderately serious bug worth fixing. I mean if you have a COPY command that worked before a dump/restore but that's wrong afterwards, it's pretty ugly, no? Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers