|
355 | 355 | </para>
|
356 | 356 | </sect2>
|
357 | 357 |
|
| 358 | + <sect2> |
| 359 | + <title>Remote Query Execution Environment</title> |
| 360 | + |
| 361 | + <para> |
| 362 | + In the remote sessions opened by <filename>postgres_fdw</>, |
| 363 | + the <xref linkend="guc-search-path"> parameter is set to |
| 364 | + just <literal>pg_catalog</>, so that only built-in objects are visible |
| 365 | + without schema qualification. This is not an issue for queries |
| 366 | + generated by <filename>postgres_fdw</> itself, because it always |
| 367 | + supplies such qualification. However, this can pose a hazard for |
| 368 | + functions that are executed on the remote server via triggers or rules |
| 369 | + on remote tables. For example, if a remote table is actually a view, |
| 370 | + any functions used in that view will be executed with the restricted |
| 371 | + search path. It is recommended to schema-qualify all names in such |
| 372 | + functions, or else attach <literal>SET search_path</> options |
| 373 | + (see <xref linkend="sql-createfunction">) to such functions |
| 374 | + to establish their expected search path environment. |
| 375 | + </para> |
| 376 | + |
| 377 | + <para> |
| 378 | + <filename>postgres_fdw</> likewise establishes remote session settings |
| 379 | + for the parameters <xref linkend="guc-timezone">, |
| 380 | + <xref linkend="guc-datestyle">, <xref linkend="guc-intervalstyle">, |
| 381 | + and <xref linkend="guc-extra-float-digits">. These are less likely |
| 382 | + to be problematic than <varname>search_path</>, but can be handled |
| 383 | + with function <literal>SET</> options if the need arises. |
| 384 | + </para> |
| 385 | + |
| 386 | + <para> |
| 387 | + It is <emphasis>not</> recommended that you override this behavior by |
| 388 | + changing the session-level settings of these parameters; that is likely |
| 389 | + to cause <filename>postgres_fdw</> to malfunction. |
| 390 | + </para> |
| 391 | + </sect2> |
| 392 | + |
358 | 393 | <sect2>
|
359 | 394 | <title>Cross-Version Compatibility</title>
|
360 | 395 |
|
|
0 commit comments