Using the MySQL foreign data wrapper in PostgreSQL there is a nice trick that enables you to quickly tell Postgres about all the tables in a MySQL database. It is as follows:
IMPORT FOREIGN SCHEMA my_favourite_database FROM SERVER mysql_server INTO public;
There is no analog DROP FOREIGN SCHEMA. Although DROP FOREIGN TABLE could be done piecemeal for each table, this also requires knowing the names of all tables in the foreign database. I am also uncertain if this command actually DROPs the table in the foreign database or just the connection to it.
How would one approach this automatically.
I imagine the same approach would apply to any foreign data wrapper in PostgreSQL