Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/ref/create_opclass.sgml`
cf2fb30e528f9fdbf42cced8bc438d7d7d595c053e7cb5d60000000100000ade
   as the operator class's data type.
     </para>

     <para>
      In a <literal>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)
      or the class's data type (for B-tree sort support functions,
      B-tree equal image functions, and all functions in GiST,
      SP-GiST, GIN and BRIN operator classes).  These defaults are
      correct, and so <replaceable
       class="parameter">op_type</replaceable> need not be specified
      in <literal>FUNCTION</literal> clauses, except for the case of a
      B-tree sort support function that is meant to support
      cross-data-type comparisons.
     </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 class.
     </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 class.
     </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">storage_type</replaceable></term>
    <listitem>
     <para>
      The data type actually stored in the index.  Normally this is
      the same as the column data type, but some index methods
      (currently GiST, GIN, SP-GiST and BRIN) allow it to be different.  The
      <literal>STORAGE</literal> clause must be omitted unless the index
      method allows a different type to be used.
      If the column <replaceable class="parameter">data_type</replaceable> is specified
      as <type>anyarray</type>, the <replaceable class="parameter">storage_type</replaceable>
    

Title: CREATE OPERATOR CLASS Parameters (Continued)
Summary
This section continues detailing parameters for the CREATE OPERATOR CLASS command, focusing on parameters related to functions within the class. It covers the sort_family_name for btree operator families, support_number for index method support functions, function_name for the function itself, argument_type for the function's parameters, and storage_type for the data type stored in the index (which can differ from the column data type for some index methods like GiST, GIN, SP-GiST, and BRIN).