BUG #1801: pg_dump dumps tables in alphabetical order, not as created

From: "Peter Valach" <valach(at)pv2c(dot)sk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1801: pg_dump dumps tables in alphabetical order, not as created
Date: 2005-08-02 22:00:12
Message-ID: 20050802220012.08974F0B0B@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1801
Logged by: Peter Valach
Email address: valach(at)pv2c(dot)sk
PostgreSQL version: 8.0.3
Operating system: Linux (Gentoo)
Description: pg_dump dumps tables in alphabetical order, not as
created
Details:

When using pg_dump, it stores tables inside dump file in alphabetical order,
not in the order they were created. This is not a problem for full dump
(because foreign keys are created at the end), but it is a big problem for
--data-only.

Example: I have two tables "aaa" and "bbb", and some column from "aaa"
references "bbb". Before (7.x.x), pg_dump --data-only will dump "bbb" table
first, "aaa" second (they were created in this order) and restore will go
OK. Now (8.0.x, 8.0.1 and 8.0.3 tested) it dumps "aaa" first and I get "...
violates foreign key" messages and no "aaa" table data is restored.

I hope I'm not missing something, but I didn't find anything about this in
pg_dump docs.

Browse pgsql-bugs by date

  From Date Subject
Next Message Jenny Wang 2005-08-03 03:17:15 BUG #1802: index is not a btree
Previous Message Jaime Casanova 2005-08-02 18:30:17 Re: [BUGS] BUG #1552 followup