pgloader
pgloader copied to clipboard
Only select dependencies in the pg_class catalog
This makes sure we do not select dependencies form the pg_operator class or other similar things.
Otherwise, if your FK has a dependency on something like a pg_operator (e.g., when your FK is pointing to a CITEXT column), things will break with the message:
ERROR pgsql: The value
NIL
is not of type
PGLOADER.CATALOG:INDEX
during PGLOADER.PGSQL:LIST-ALL-FKEYS.
I'm not an expert on the exact contents on the pg_class and pg_depend tables, so can't guarantee this is the 100% correct fix.
Fixes dimitri/pgloader#1289