该查询产生外部表及其服务器:
select n.nspname as "schema", c.relname as "table", s.srvname as "server", ft.ftoptions as "table options" from pg_foreign_table ft join pg_class c on c.oid = ft.ftrelid join pg_namespace n on n.oid = c.relnamespace join pg_foreign_server s on s.oid = ft.ftserver where pg_table_is_visible(c.oid) order by n.nspname, c.relname;