]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/alter_tsdictionary.sgml
Trim trailing whitespace
[postgresql] / doc / src / sgml / ref / alter_tsdictionary.sgml
1 <!--
2 doc/src/sgml/ref/alter_tsdictionary.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-ALTERTSDICTIONARY">
7  <indexterm zone="sql-altertsdictionary">
8   <primary>ALTER TEXT SEARCH DICTIONARY</primary>
9  </indexterm>
10
11  <refmeta>
12   <refentrytitle>ALTER TEXT SEARCH DICTIONARY</refentrytitle>
13   <manvolnum>7</manvolnum>
14   <refmiscinfo>SQL - Language Statements</refmiscinfo>
15  </refmeta>
16
17  <refnamediv>
18   <refname>ALTER TEXT SEARCH DICTIONARY</refname>
19   <refpurpose>change the definition of a text search dictionary</refpurpose>
20  </refnamediv>
21
22  <refsynopsisdiv>
23 <synopsis>
24 ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> (
25     <replaceable class="parameter">option</replaceable> [ = <replaceable class="parameter">value</replaceable> ] [, ... ]
26 )
27 ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> RENAME TO <replaceable>new_name</replaceable>
28 ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_USER | SESSION_USER }
29 ALTER TEXT SEARCH DICTIONARY <replaceable>name</replaceable> SET SCHEMA <replaceable>new_schema</replaceable>
30 </synopsis>
31  </refsynopsisdiv>
32
33  <refsect1>
34   <title>Description</title>
35
36   <para>
37    <command>ALTER TEXT SEARCH DICTIONARY</command> changes the definition of
38    a text search dictionary.  You can change the dictionary's
39    template-specific options, or change the dictionary's name or owner.
40   </para>
41
42   <para>
43    You must be the owner of the dictionary to use
44    <command>ALTER TEXT SEARCH DICTIONARY</>.
45   </para>
46  </refsect1>
47
48  <refsect1>
49   <title>Parameters</title>
50
51   <variablelist>
52    <varlistentry>
53     <term><replaceable class="parameter">name</replaceable></term>
54     <listitem>
55      <para>
56       The name (optionally schema-qualified) of an existing text search
57       dictionary.
58      </para>
59     </listitem>
60    </varlistentry>
61
62    <varlistentry>
63     <term><replaceable class="parameter">option</replaceable></term>
64     <listitem>
65      <para>
66       The name of a template-specific option to be set for this dictionary.
67      </para>
68     </listitem>
69    </varlistentry>
70
71    <varlistentry>
72     <term><replaceable class="parameter">value</replaceable></term>
73     <listitem>
74      <para>
75       The new value to use for a template-specific option.
76       If the equal sign and value are omitted, then any previous
77       setting for the option is removed from the dictionary,
78       allowing the default to be used.
79      </para>
80     </listitem>
81    </varlistentry>
82
83    <varlistentry>
84     <term><replaceable class="parameter">new_name</replaceable></term>
85     <listitem>
86      <para>
87       The new name of the text search dictionary.
88      </para>
89     </listitem>
90    </varlistentry>
91
92    <varlistentry>
93     <term><replaceable class="parameter">new_owner</replaceable></term>
94     <listitem>
95      <para>
96       The new owner of the text search dictionary.
97      </para>
98     </listitem>
99    </varlistentry>
100
101    <varlistentry>
102     <term><replaceable class="parameter">new_schema</replaceable></term>
103     <listitem>
104      <para>
105       The new schema for the text search dictionary.
106      </para>
107     </listitem>
108    </varlistentry>
109  </variablelist>
110
111   <para>
112    Template-specific options can appear in any order.
113   </para>
114  </refsect1>
115
116  <refsect1>
117   <title>Examples</title>
118
119   <para>
120    The following example command changes the stopword list
121    for a Snowball-based dictionary.  Other parameters remain unchanged.
122   </para>
123
124 <programlisting>
125 ALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );
126 </programlisting>
127
128   <para>
129    The following example command changes the language option to <literal>dutch</>,
130    and removes the stopword option entirely.
131   </para>
132
133 <programlisting>
134 ALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );
135 </programlisting>
136
137   <para>
138    The following example command <quote>updates</> the dictionary's
139    definition without actually changing anything.
140
141 <programlisting>
142 ALTER TEXT SEARCH DICTIONARY my_dict ( dummy );
143 </programlisting>
144
145    (The reason this works is that the option removal code doesn't complain
146    if there is no such option.)  This trick is useful when changing
147    configuration files for the dictionary: the <command>ALTER</> will
148    force existing database sessions to re-read the configuration files,
149    which otherwise they would never do if they had read them earlier.
150   </para>
151  </refsect1>
152
153  <refsect1>
154   <title>Compatibility</title>
155
156   <para>
157    There is no <command>ALTER TEXT SEARCH DICTIONARY</command> statement in
158    the SQL standard.
159   </para>
160  </refsect1>
161
162  <refsect1>
163   <title>See Also</title>
164
165   <simplelist type="inline">
166    <member><xref linkend="sql-createtsdictionary"></member>
167    <member><xref linkend="sql-droptsdictionary"></member>
168   </simplelist>
169  </refsect1>
170 </refentry>