Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/ref/alter_tsdictionary.sgml`
24dd61ce8c4f44507927c3cec64ba28f0dcacc2de53310290000000100000d4d
 or owner.
  </para>

  <para>
   You must be the owner of the dictionary to use
   <command>ALTER TEXT SEARCH DICTIONARY</command>.
  </para>
 </refsect1>

 <refsect1>
  <title>Parameters</title>

  <variablelist>
   <varlistentry>
    <term><replaceable class="parameter">name</replaceable></term>
    <listitem>
     <para>
      The name (optionally schema-qualified) of an existing text search
      dictionary.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">option</replaceable></term>
    <listitem>
     <para>
      The name of a template-specific option to be set for this dictionary.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">value</replaceable></term>
    <listitem>
     <para>
      The new value to use for a template-specific option.
      If the equal sign and value are omitted, then any previous
      setting for the option is removed from the dictionary,
      allowing the default to be used.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">new_name</replaceable></term>
    <listitem>
     <para>
      The new name of the text search dictionary.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">new_owner</replaceable></term>
    <listitem>
     <para>
      The new owner of the text search dictionary.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">new_schema</replaceable></term>
    <listitem>
     <para>
      The new schema for the text search dictionary.
     </para>
    </listitem>
   </varlistentry>
 </variablelist>

  <para>
   Template-specific options can appear in any order.
  </para>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   The following example command changes the stopword list
   for a Snowball-based dictionary.  Other parameters remain unchanged.
  </para>

<programlisting>
ALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );
</programlisting>

  <para>
   The following example command changes the language option to <literal>dutch</literal>,
   and removes the stopword option entirely.
  </para>

<programlisting>
ALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );
</programlisting>

  <para>
   The following example command <quote>updates</quote> the dictionary's
   definition without actually changing anything.

<programlisting>
ALTER TEXT SEARCH DICTIONARY my_dict ( dummy );
</programlisting>

   (The reason this works is that the option removal code doesn't complain
   if there is no such option.)  This trick is useful when changing
   configuration files for the dictionary: the <command>ALTER</command> will
   force existing database sessions to re-read the configuration files,
   which otherwise they would never do if they had read them earlier.
  </para>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>

  <para>
   There is no <command>ALTER TEXT SEARCH DICTIONARY</command> statement in
   the SQL standard.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-createtsdictionary"/></member>
   <member><xref linkend="sql-droptsdictionary"/></member>
  </simplelist>
 </refsect1>
</refentry>

Title: ALTER TEXT SEARCH DICTIONARY - Parameters, Examples, and Compatibility
Summary
This section details the parameters for the ALTER TEXT SEARCH DICTIONARY command, including name, option, value, new_name, new_owner and new_schema. It provides examples of how to modify dictionary options, such as changing the stopword list or language, and how to force database sessions to re-read configuration files. It also notes that this command is not part of the SQL standard and lists related commands.