2
doc/src/sgml/ref/alter_tsconfig.sgml
3
PostgreSQL documentation
6
<refentry id="SQL-ALTERTSCONFIG">
8
<refentrytitle>ALTER TEXT SEARCH CONFIGURATION</refentrytitle>
9
<manvolnum>7</manvolnum>
10
<refmiscinfo>SQL - Language Statements</refmiscinfo>
14
<refname>ALTER TEXT SEARCH CONFIGURATION</refname>
15
<refpurpose>change the definition of a text search configuration</refpurpose>
18
<indexterm zone="sql-altertsconfig">
19
<primary>ALTER TEXT SEARCH CONFIGURATION</primary>
24
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable>
25
ADD MAPPING FOR <replaceable class="parameter">token_type</replaceable> [, ... ] WITH <replaceable class="parameter">dictionary_name</replaceable> [, ... ]
26
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable>
27
ALTER MAPPING FOR <replaceable class="parameter">token_type</replaceable> [, ... ] WITH <replaceable class="parameter">dictionary_name</replaceable> [, ... ]
28
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable>
29
ALTER MAPPING REPLACE <replaceable class="parameter">old_dictionary</replaceable> WITH <replaceable class="parameter">new_dictionary</replaceable>
30
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable>
31
ALTER MAPPING FOR <replaceable class="parameter">token_type</replaceable> [, ... ] REPLACE <replaceable class="parameter">old_dictionary</replaceable> WITH <replaceable class="parameter">new_dictionary</replaceable>
32
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable>
33
DROP MAPPING [ IF EXISTS ] FOR <replaceable class="parameter">token_type</replaceable> [, ... ]
34
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> RENAME TO <replaceable>new_name</replaceable>
35
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> OWNER TO <replaceable>new_owner</replaceable>
36
ALTER TEXT SEARCH CONFIGURATION <replaceable>name</replaceable> SET SCHEMA <replaceable>new_schema</replaceable>
41
<title>Description</title>
44
<command>ALTER TEXT SEARCH CONFIGURATION</command> changes the definition of
45
a text search configuration. You can modify
46
its mappings from token types to dictionaries,
47
or change the configuration's name or owner.
51
You must be the owner of the configuration to use
52
<command>ALTER TEXT SEARCH CONFIGURATION</>.
57
<title>Parameters</title>
61
<term><replaceable class="parameter">name</replaceable></term>
64
The name (optionally schema-qualified) of an existing text search
71
<term><replaceable class="parameter">token_type</replaceable></term>
74
The name of a token type that is emitted by the configuration's
81
<term><replaceable class="parameter">dictionary_name</replaceable></term>
84
The name of a text search dictionary to be consulted for the
85
specified token type(s). If multiple dictionaries are listed,
86
they are consulted in the specified order.
92
<term><replaceable class="parameter">old_dictionary</replaceable></term>
95
The name of a text search dictionary to be replaced in the mapping.
101
<term><replaceable class="parameter">new_dictionary</replaceable></term>
104
The name of a text search dictionary to be substituted for
105
<replaceable class="parameter">old_dictionary</replaceable>.
111
<term><replaceable class="parameter">new_name</replaceable></term>
114
The new name of the text search configuration.
120
<term><replaceable class="parameter">new_owner</replaceable></term>
123
The new owner of the text search configuration.
129
<term><replaceable class="parameter">new_schema</replaceable></term>
132
The new schema for the text search configuration.
139
The <literal>ADD MAPPING FOR</> form installs a list of dictionaries to be
140
consulted for the specified token type(s); it is an error if there is
141
already a mapping for any of the token types.
142
The <literal>ALTER MAPPING FOR</> form does the same, but first removing
143
any existing mapping for those token types.
144
The <literal>ALTER MAPPING REPLACE</> forms substitute <replaceable
145
class="parameter">new_dictionary</replaceable> for <replaceable
146
class="parameter">old_dictionary</replaceable> anywhere the latter appears.
147
This is done for only the specified token types when <literal>FOR</>
148
appears, or for all mappings of the configuration when it doesn't.
149
The <literal>DROP MAPPING</> form removes all dictionaries for the
150
specified token type(s), causing tokens of those types to be ignored
151
by the text search configuration. It is an error if there is no mapping
152
for the token types, unless <literal>IF EXISTS</> appears.
158
<title>Examples</title>
161
The following example replaces the <literal>english</> dictionary
162
with the <literal>swedish</> dictionary anywhere that <literal>english</>
163
is used within <literal>my_config</>.
167
ALTER TEXT SEARCH CONFIGURATION my_config
168
ALTER MAPPING REPLACE english WITH swedish;
173
<title>Compatibility</title>
176
There is no <command>ALTER TEXT SEARCH CONFIGURATION</command> statement in
182
<title>See Also</title>
184
<simplelist type="inline">
185
<member><xref linkend="sql-createtsconfig"></member>
186
<member><xref linkend="sql-droptsconfig"></member>