<div dir="ltr"><div><div><div><div>On Wed, 29 Mar 2017 21:18:39 +0200 (CEST) Thorsten Glaser <<a href="mailto:t.glaser@tarent.de">t.glaser@tarent.de</a>> wrote:<br>> > What have I expected?<br>> > <br>> > That pg_dump recognises the dependency (there is a FOREIGN KEY reference<br>> > in there) and reorders the tables dumped.<br><br></div>You should include the exact definition of the FOREIGN KEY constraint in the bug report.<br><br></div>The actual error we see above is from a CHECK constraint, which is not _meant_ to reference other tables.<br><br></div><div>Related:<br><a href="http://dba.stackexchange.com/questions/75613/disable-all-constraints-and-table-checks-while-restoring-a-dump">http://dba.stackexchange.com/questions/75613/disable-all-constraints-and-table-checks-while-restoring-a-dump</a><br></div><div><br></div>Regards<br></div>Erwin Brandstetter<br></div>