The following bug has been logged on the website:
Bug reference: 15263
Logged by: Brian Ceccarelli
Email address: ceccareb@talusmusic.com
PostgreSQL version: 10.4
Operating system: Red Hat Enterprise Linux 7.5
Description:
This problem is easy to duplicate.
I have a database with a table with a function-based check constraint.
The database has another table with a function-based index.
I dump with COPY statements (the default).
When I load the database from the dump I just created, loading (via psql)
logs error messages. Postgres cannot find functions inside the function the
constraint or index invokes. You will see. The following zip file
contains a schema that caused the problem. Just create a database and run
dumpfailureexample.sql. pg_dump the database. psql to load the
database. The load log is dumpfailureexample.log.
http://talussoftware.com/docs/dumpfailure.zip
------------------------------
I discovered this problem when I dumped a Postgres 9.6.2 DB to a 10.4 DB.
When I dump using 9's version of pg_dump, the subsequent load works. When
I dump using 10's pg_dump, the subsequent load fails.