|
437 | 437 | </para>
|
438 | 438 | </sect2>
|
439 | 439 |
|
| 440 | + <sect2> |
| 441 | + <title>Remote Query Execution Environment</title> |
| 442 | + |
| 443 | + <para> |
| 444 | + In the remote sessions opened by <filename>postgres_fdw</>, |
| 445 | + the <xref linkend="guc-search-path"> parameter is set to |
| 446 | + just <literal>pg_catalog</>, so that only built-in objects are visible |
| 447 | + without schema qualification. This is not an issue for queries |
| 448 | + generated by <filename>postgres_fdw</> itself, because it always |
| 449 | + supplies such qualification. However, this can pose a hazard for |
| 450 | + functions that are executed on the remote server via triggers or rules |
| 451 | + on remote tables. For example, if a remote table is actually a view, |
| 452 | + any functions used in that view will be executed with the restricted |
| 453 | + search path. It is recommended to schema-qualify all names in such |
| 454 | + functions, or else attach <literal>SET search_path</> options |
| 455 | + (see <xref linkend="sql-createfunction">) to such functions |
| 456 | + to establish their expected search path environment. |
| 457 | + </para> |
| 458 | + |
| 459 | + <para> |
| 460 | + <filename>postgres_fdw</> likewise establishes remote session settings |
| 461 | + for the parameters <xref linkend="guc-timezone">, |
| 462 | + <xref linkend="guc-datestyle">, <xref linkend="guc-intervalstyle">, |
| 463 | + and <xref linkend="guc-extra-float-digits">. These are less likely |
| 464 | + to be problematic than <varname>search_path</>, but can be handled |
| 465 | + with function <literal>SET</> options if the need arises. |
| 466 | + </para> |
| 467 | + |
| 468 | + <para> |
| 469 | + It is <emphasis>not</> recommended that you override this behavior by |
| 470 | + changing the session-level settings of these parameters; that is likely |
| 471 | + to cause <filename>postgres_fdw</> to malfunction. |
| 472 | + </para> |
| 473 | + </sect2> |
| 474 | + |
440 | 475 | <sect2>
|
441 | 476 | <title>Cross-Version Compatibility</title>
|
442 | 477 |
|
|
0 commit comments