3
PostgreSQL documentation
6
<refentry id="SQL-ALTERTSDICTIONARY">
8
<refentrytitle id="SQL-ALTERTSDICTIONARY-TITLE">ALTER TEXT SEARCH DICTIONARY</refentrytitle>
9
<manvolnum>7</manvolnum>
10
<refmiscinfo>SQL - Language Statements</refmiscinfo>
14
<refname>ALTER TEXT SEARCH DICTIONARY</refname>
15
<refpurpose>change the definition of a text search dictionary</refpurpose>
18
<indexterm zone="sql-altertsdictionary">
19
<primary>ALTER TEXT SEARCH DICTIONARY</primary>
24
ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> (
25
<replaceable class="parameter">option</replaceable> [ = <replaceable class="parameter">value</replaceable> ] [, ... ]
27
ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
28
ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> OWNER TO <replaceable>newowner</replaceable>
33
<title>Description</title>
36
<command>ALTER TEXT SEARCH DICTIONARY</command> changes the definition of
37
a text search dictionary. You can change the dictionary's
38
template-specific options, or change the dictionary's name or owner.
42
You must be the owner of the dictionary to use
43
<command>ALTER TEXT SEARCH DICTIONARY</>.
48
<title>Parameters</title>
52
<term><replaceable class="parameter">name</replaceable></term>
55
The name (optionally schema-qualified) of an existing text search
62
<term><replaceable class="parameter">option</replaceable></term>
65
The name of a template-specific option to be set for this dictionary.
71
<term><replaceable class="parameter">value</replaceable></term>
74
The new value to use for a template-specific option.
75
If the equal sign and value are omitted, then any previous
76
setting for the option is removed from the dictionary,
77
allowing the default to be used.
83
<term><replaceable class="parameter">newname</replaceable></term>
86
The new name of the text search dictionary.
92
<term><replaceable class="parameter">newowner</replaceable></term>
95
The new owner of the text search dictionary.
102
Template-specific options can appear in any order.
107
<title>Examples</title>
110
The following example command changes the stopword list
111
for a Snowball-based dictionary. Other parameters remain unchanged.
115
ALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );
119
The following example command changes the language option to dutch,
120
and removes the stopword option entirely.
124
ALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );
128
The following example command <quote>updates</> the dictionary's
129
definition without actually changing anything.
132
ALTER TEXT SEARCH DICTIONARY my_dict ( dummy );
135
(The reason this works is that the option removal code doesn't complain
136
if there is no such option.) This trick is useful when changing
137
configuration files for the dictionary: the <command>ALTER</> will
138
force existing database sessions to re-read the configuration files,
139
which otherwise they would never do if they had read them earlier.
144
<title>Compatibility</title>
147
There is no <command>ALTER TEXT SEARCH DICTIONARY</command> statement in
153
<title>See Also</title>
155
<simplelist type="inline">
156
<member><xref linkend="sql-createtsdictionary" endterm="sql-createtsdictionary-title"></member>
157
<member><xref linkend="sql-droptsdictionary" endterm="sql-droptsdictionary-title"></member>