summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-09-25 10:53:55 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-09-25 10:53:55 -0400
commit1d7e8e772453a4edd99b3954a9f3707ce5a2176a (patch)
treeba93b8da272bb6d668108b432855048ba8e5c8e0
parenteb643536b9f16d58e17f21a226dd63be61e44011 (diff)
Doc: extend warnings about collation-mismatch hazards in postgres_fdw.
Be a little more vocal about the risks of remote collations not matching local ones. Actually fixing these risks seems hard, and I've given up on the idea that it might be back-patchable. So the best we can do for the back branches is add documentation. Per discussion of bug #16583 from Jiří Fejfar. Discussion: https://postgr.es/m/2438715.1632510693@sss.pgh.pa.us
-rw-r--r--doc/src/sgml/postgres-fdw.sgml15
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index 1fa394ba1d9..4d5adf1f1b1 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -82,8 +82,8 @@
referenced columns of the remote table. Although <filename>postgres_fdw</>
is currently rather forgiving about performing data type conversions at
need, surprising semantic anomalies may arise when types or collations do
- not match, due to the remote server interpreting <literal>WHERE</> clauses
- slightly differently from the local server.
+ not match, due to the remote server interpreting query conditions
+ differently from the local server.
</para>
<para>
@@ -382,6 +382,17 @@
need to turn this off if the remote server has a different set of
collation names than the local server does, which is likely to be the
case if it's running on a different operating system.
+ If you do so, however, there is a very severe risk that the imported
+ table columns' collations will not match the underlying data, resulting
+ in anomalous query behavior.
+ </para>
+
+ <para>
+ Even when this parameter is set to <literal>true</literal>, importing
+ columns whose collation is the remote server's default can be risky.
+ They will be imported with <literal>COLLATE "default"</literal>, which
+ will select the local server's default collation, which could be
+ different.
</para>
</listitem>
</varlistentry>