postgresql_16:9.6.38.6 Remote Query Execution Environment
PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > postgres_fdw — access data stored in external PostgreSQL servers > Remote Query Execution Environment
In the remote sessions opened by postgres_fdw, the (see guc-search-path) parameter is set to just pg_catalog, so that only built-in objects are visible without schema qualification. This is not an issue for queries generated by postgres_fdw itself, because it always supplies such qualification. However, this can pose a hazard for functions that are executed on the remote server via triggers or rules on remote tables. For example, if a remote table is actually a view, any functions used in that view will be executed with the restricted search path. It is recommended to schema-qualify all names in such functions, or else attach SET search_path options (see (see postgresql_16:7.1.65)) to such functions to establish their expected search path environment.
postgres_fdw likewise establishes remote session settings for various parameters: (see guc-timezone) is set to UTC (see guc-datestyle) is set to ISO (see guc-intervalstyle) is set to postgres (see guc-extra-float-digits) is set to 3 for remote servers 9.0 and newer and is set to 2 for older versions These are less likely to be problematic than search_path, but can be handled with function SET options if the need arises.
It is *not* recommended that you override this behavior by changing the session-level settings of these parameters; that is likely to cause postgres_fdw to malfunction.