foreign_table_exposer
foreign_table_exposer · Exposes foreign tables as regular tables for catalog-based clients.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100147 | foreign_table_exposer | foreign_table_exposer | 1.0 | UTIL | Apache-2.0 | C |
PostgreSQL · 10, 11, 12, 13, 14, 15, 16, 17, 18
Usage
Sources:
foreign_table_exposer 1.0 makes catalog clients that search only for ordinary tables and views discover PostgreSQL foreign tables. It does this by rewriting qualifying pg_catalog.pg_class queries, not by changing foreign-table storage or transaction semantics.
Core Workflow
Load the module at server start, restart PostgreSQL, and enable its SQL objects in each database that needs the behavior.
After activation, a catalog predicate equivalent to relkind IN ('r', 'v') is rewritten to include foreign tables with relkind f. This targets older BI and metadata tools that otherwise hide them.
Operational Boundaries
The rewrite hook affects matching catalog queries throughout the server and can surprise clients that intentionally exclude foreign tables. It does not make FDW operations local, transactional, or inexpensive. The release dates from 2015; test it on the exact PostgreSQL major, with other hook-using extensions, and against each client query before production use.