The following bug has been logged online:

Bug reference:      2308
Logged by:          Matthew George
Email address:      [EMAIL PROTECTED]
PostgreSQL version: 8.0.3
Operating system:   Darwin Kernel Version 8.5.0: Sun Jan 22 10:38:46 PST
2006; root:xnu-792.6.61.obj~1/RELEASE_PPC Power Macintosh powerpc
Description:        pg_dump -a does not respect referential dependencies
Details: 

When using pg_dump to dump a database, the schema and data are arranged
within the dump so that it may be imported without violating referential
integrity.

When using the -a option to get a data-only dump, the data is ordered in the
dump alphabetically by table.

If a new schema is loaded into a fresh database, the output from the
data-only dump cannot be imported via \i in psql without manually editing
the dump file and reordering the inserts / copies such that dependent tables
have their data loaded before the tables that depend on them.  This is
inconvenient at best.

Since the logic obviously exists within pg_dump already to arrange the data
in the correct order of reference dependencies, can this be added to the
code path for `pg_dump -a` as well?  Or can another option be added that
specifies alphabetic vs. dependency order?

This would really cut down the time it takes to do schema upgrades on
projects that I work with.

Thanks

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to