Make pg_dump --data-only try to order the table dumps so that foreign keys'
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 Sep 2008 15:26:23 +0000 (15:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 Sep 2008 15:26:23 +0000 (15:26 +0000)
commit97a144cd9ad2aaa4b1cfbdf40069cc8beed798a3
tree15c6cbaeef4b6c8296c4337a26ca1cc9aa395afb
parent8e65a0cfd2a062485719e6e9fa8926fad3ba48ca
Make pg_dump --data-only try to order the table dumps so that foreign keys'
referenced tables are dumped before the referencing tables.  This avoids
failures when the data is loaded with the FK constraints already active.
If no such ordering is possible because of circular or self-referential
constraints, print a NOTICE to warn the user about it.
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dump_sort.c