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