Uninstalls the BigQuery FDW extension from PostgreSQL, removing its objects and metadata.
Remove the extension when you no longer query BigQuery from PostgreSQL, wish to clean dependencies, or must tighten security.
All foreign tables, servers, and user mappings that rely on bigquery_fdw
must be dropped or cascaded; otherwise DROP EXTENSION
fails.
Run \dx+ bigquery_fdw
in psql to view foreign tables, servers, and functions tied to the extension.
Example: DROP FOREIGN TABLE IF EXISTS orders_bq;
Repeat for each table.
DROP SERVER IF EXISTS bq_server CASCADE;
removes attached user mappings, simplifying cleanup.
DROP EXTENSION IF EXISTS bigquery_fdw;
completes the uninstall.
Yes, append CASCADE
to automatically drop dependent objects, but ensure nothing mission-critical is lost.
Re-run tests, update documentation, and revoke any service accounts that previously authenticated to BigQuery.
.
No. The command only alters PostgreSQL metadata; BigQuery datasets stay intact.
Yes. Re-create the extension with CREATE EXTENSION bigquery_fdw;
and re-establish servers and foreign tables.
Usually no. The operation is metadata-only, but ensure no sessions query the foreign tables to avoid errors.