summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2018-09-06 14:49:45 +0000
committerTom Lane2018-09-06 14:49:45 +0000
commit594ee1ada5bc9affa37751d7ee840acb636a1f32 (patch)
treeb05d554332927b67ea8e06ed4c8ce7f683cf85c1 /doc/src
parent5b114b045a479e584be9252dedac4c357c456311 (diff)
Make contrib/unaccent's unaccent() function work when not in search path.
Since the fixes for CVE-2018-1058, we've advised people to schema-qualify function references in order to fix failures in code that executes under a minimal search_path setting. However, that's insufficient to make the single-argument form of unaccent() work, because it looks up the "unaccent" text search dictionary using the search path. The most expedient answer seems to be to remove the search_path dependency by making it look in the same schema that the unaccent() function itself is declared in. This will definitely work for the normal usage of this function with the unaccent dictionary provided by the extension. It's barely possible that there are people who were relying on the search-path-dependent behavior to select other dictionaries with the same name; but if there are any such people at all, they can still get that behavior by writing unaccent('unaccent', ...), or possibly unaccent('unaccent'::text::regdictionary, ...) if the lookup has to be postponed to runtime. Per complaint from Gunnlaugur Thor Briem. Back-patch to all supported branches. Discussion: https://postgr.es/m/CAPs+M8LCex6d=DeneofdsoJVijaG59m9V0ggbb3pOH7hZO4+cQ@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/unaccent.sgml8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/src/sgml/unaccent.sgml b/doc/src/sgml/unaccent.sgml
index 2b127e6736c..e47201ee39e 100644
--- a/doc/src/sgml/unaccent.sgml
+++ b/doc/src/sgml/unaccent.sgml
@@ -174,12 +174,14 @@ mydb=# select ts_headline('fr','Hôtel de la Mer',to_tsquery('fr','Hotels')
</indexterm>
<synopsis>
-unaccent(<optional><replaceable class="PARAMETER">dictionary</replaceable>, </optional> <replaceable class="PARAMETER">string</replaceable>) returns <type>text</type>
+unaccent(<optional><replaceable class="parameter">dictionary</replaceable> <type>regdictionary</type>, </optional> <replaceable class="parameter">string</replaceable> <type>text</type>) returns <type>text</type>
</synopsis>
<para>
- If the <replaceable class="PARAMETER">dictionary</replaceable> argument is
- omitted, <literal>unaccent</> is assumed.
+ If the <replaceable class="parameter">dictionary</replaceable> argument is
+ omitted, the text search dictionary named <literal>unaccent</literal> and
+ appearing in the same schema as the <function>unaccent()</function>
+ function itself is used.
</para>
<para>