How can I list Foreign tables in PostgreSQL?
You can also use this command:
\detr
According to the manual \dE[S+]
should do it.
http://www.postgresql.org/docs/current/static/app-psql.html
To see the query behind this, start psql with the -e
("echo queries") option.
Or use the information_schema.tables
view: http://www.postgresql.org/docs/current/static/infoschema-tables.html
The table_type
column will contain FOREIGN TABLE
for those tables.
Query for listing foreign tables only:
select * from information_schema.foreign_tables