Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/ref/alter_opfamily.sgml`
a15eb9840486f2d480e24e54d3beffa885b0ec4e75926e750000000100000bf1


     <para>
      In an <literal>ADD FUNCTION</literal> clause, the operand data type(s) the
      function is intended to support, if different from
      the input data type(s) of the function.  For B-tree comparison functions
      and hash functions it is not necessary to specify <replaceable
      class="parameter">op_type</replaceable> since the function's input
      data type(s) are always the correct ones to use.  For B-tree sort
      support functions, B-Tree equal image functions, and all
      functions in GiST, SP-GiST and GIN operator classes, it is
      necessary to specify the operand data type(s) the function is to
      be used with.
     </para>

     <para>
      In a <literal>DROP FUNCTION</literal> clause, the operand data type(s) the
      function is intended to support must be specified.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">sort_family_name</replaceable></term>
    <listitem>
     <para>
      The name (optionally schema-qualified) of an existing <literal>btree</literal> operator
      family that describes the sort ordering associated with an ordering
      operator.
     </para>

     <para>
      If neither <literal>FOR SEARCH</literal> nor <literal>FOR ORDER BY</literal> is
      specified, <literal>FOR SEARCH</literal> is the default.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">support_number</replaceable></term>
    <listitem>
     <para>
      The index method's support function number for a
      function associated with the operator family.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">function_name</replaceable></term>
    <listitem>
     <para>
      The name (optionally schema-qualified) of a function that is an index
      method support function for the operator family.  If no argument list
      is specified, the name must be unique in its schema.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">argument_type</replaceable></term>
    <listitem>
     <para>
      The parameter data type(s) of the function.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">new_name</replaceable></term>
    <listitem>
     <para>
      The new name of the operator family.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">new_owner</replaceable></term>
    <listitem>
     <para>
      The new owner of the operator family.
     </para>
    </listitem>
   </varlistentry>

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

  <para>
   The <literal>OPERATOR</literal> and <literal>FUNCTION</literal>
   clauses can appear in any order.
  </para>

Title: ALTER OPERATOR FAMILY - Parameters (cont.)
Summary
This section details the remaining parameters for the `ALTER OPERATOR FAMILY` command, including `sort_family_name` (for specifying sort ordering in btree operator families), `support_number` (the index method's support function number), `function_name` and `argument_type` (for identifying support functions), and parameters for renaming the operator family (`new_name`), changing its owner (`new_owner`), or moving it to a different schema (`new_schema`). The OPERATOR and FUNCTION clauses can be specified in any order.