3 PostgreSQL documentation
6 <refentry id=
"SQL-ALTERTSCONFIG">
8 <refentrytitle id=
"SQL-ALTERTSCONFIG-TITLE">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>newname
</replaceable>
35 ALTER TEXT SEARCH CONFIGURATION
<replaceable>name
</replaceable> OWNER TO
<replaceable>newowner
</replaceable>
40 <title>Description
</title>
43 <command>ALTER TEXT SEARCH CONFIGURATION
</command> changes the definition of
44 a text search configuration. You can modify
45 its mappings from token types to dictionaries,
46 or change the configuration's name or owner.
50 You must be the owner of the configuration to use
51 <command>ALTER TEXT SEARCH CONFIGURATION<
/>.
56 <title>Parameters
</title>
60 <term><replaceable class=
"parameter">name
</replaceable></term>
63 The name (optionally schema-qualified) of an existing text search
70 <term><replaceable class=
"parameter">token_type
</replaceable></term>
73 The name of a token type that is emitted by the configuration's
80 <term><replaceable class=
"parameter">dictionary_name
</replaceable></term>
83 The name of a text search dictionary to be consulted for the
84 specified token type(s). If multiple dictionaries are listed,
85 they are consulted in the specified order.
91 <term><replaceable class=
"parameter">old_dictionary
</replaceable></term>
94 The name of a text search dictionary to be replaced in the mapping.
100 <term><replaceable class=
"parameter">new_dictionary
</replaceable></term>
103 The name of a text search dictionary to be substituted for
104 <replaceable class=
"parameter">old_dictionary
</replaceable>.
110 <term><replaceable class=
"parameter">newname
</replaceable></term>
113 The new name of the text search configuration.
119 <term><replaceable class=
"parameter">newowner
</replaceable></term>
122 The new owner of the text search configuration.
129 The
<literal>ADD MAPPING FOR<
/> form installs a list of dictionaries to be
130 consulted for the specified token type(s); it is an error if there is
131 already a mapping for any of the token types.
132 The
<literal>ALTER MAPPING FOR<
/> form does the same, but first removing
133 any existing mapping for those token types.
134 The
<literal>ALTER MAPPING REPLACE<
/> forms substitute
<replaceable
135 class=
"parameter">new_dictionary
</replaceable> for
<replaceable
136 class=
"parameter">old_dictionary
</replaceable> anywhere the latter appears.
137 This is done for only the specified token types when
<literal>FOR<
/>
138 appears, or for all mappings of the configuration when it doesn't.
139 The
<literal>DROP MAPPING<
/> form removes all dictionaries for the
140 specified token type(s), causing tokens of those types to be ignored
141 by the text search configuration. It is an error if there is no mapping
142 for the token types, unless
<literal>IF EXISTS<
/> appears.
148 <title>Examples
</title>
151 The following example replaces the
<literal>english<
/> dictionary
152 with the
<literal>swedish<
/> dictionary anywhere that
<literal>english<
/>
153 is used within
<literal>my_config<
/>.
157 ALTER TEXT SEARCH CONFIGURATION my_config
158 ALTER MAPPING REPLACE english WITH swedish;
163 <title>Compatibility
</title>
166 There is no
<command>ALTER TEXT SEARCH CONFIGURATION
</command> statement in
172 <title>See Also
</title>
174 <simplelist type=
"inline">
175 <member><xref linkend=
"sql-createtsconfig" endterm=
"sql-createtsconfig-title"></member>
176 <member><xref linkend=
"sql-droptsconfig" endterm=
"sql-droptsconfig-title"></member>