<refnamediv>
<refname>ALTER OPERATOR FAMILY</refname>
<refpurpose>change the definition of an operator family</refpurpose>
- </refnamediv>
-
+ </refnamediv>
+
<indexterm zone="sql-alteropfamily">
<primary>ALTER OPERATOR FAMILY</primary>
</indexterm>
<refsynopsisdiv>
<synopsis>
ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> ADD
- { OPERATOR <replaceable class="parameter">strategy_number</replaceable> <replaceable class="parameter">operator_name</replaceable> ( <replaceable class="parameter">op_type</replaceable>, <replaceable class="parameter">op_type</replaceable> )
+ { OPERATOR <replaceable class="parameter">strategy_number</replaceable> <replaceable class="parameter">operator_name</replaceable> ( <replaceable class="parameter">op_type</replaceable>, <replaceable class="parameter">op_type</replaceable> ) [ FOR SEARCH | FOR ORDER BY <replaceable class="parameter">sort_family_name</replaceable> ]
| FUNCTION <replaceable class="parameter">support_number</replaceable> [ ( <replaceable class="parameter">op_type</replaceable> [ , <replaceable class="parameter">op_type</replaceable> ] ) ] <replaceable class="parameter">function_name</replaceable> ( <replaceable class="parameter">argument_type</replaceable> [, ...] )
} [, ... ]
ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> DROP
} [, ... ]
ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> RENAME TO <replaceable>new_name</replaceable>
ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> OWNER TO <replaceable>new_owner</replaceable>
+ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> SET SCHEMA <replaceable>new_schema</replaceable>
</synopsis>
</refsynopsisdiv>
-
+
<refsect1>
<title>Description</title>
Refer to <xref linkend="xindex"> for further information.
</para>
</refsect1>
-
+
<refsect1>
<title>Parameters</title>
<para>
In an <literal>ADD FUNCTION</> 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 and hash indexes
- it is not necessary to specify <replaceable
+ 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 GIN and GiST
- indexes it is necessary to specify the input data type the function
+ data type(s) are always the correct ones to use. For B-tree sort
+ support functions and all functions in GiST and GIN operator classes,
+ it is necessary to specify the operand data type(s) the function
is to be used with.
</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</> nor <literal>FOR ORDER BY</> is
+ specified, <literal>FOR SEARCH</> is the default.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><replaceable class="parameter">support_number</replaceable></term>
<listitem>
</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>
</para>
</refsect1>
-
+
<refsect1>
<title>Notes</title>
cases where an operator might or might not be lossy.
</para>
</refsect1>
-
+
<refsect1>
<title>Examples</title>
OPERATOR 4 >= (int2, int4) ,
OPERATOR 5 > (int2, int4) ,
FUNCTION 1 btint24cmp(int2, int4) ;
-</programlisting>
+</programlisting>
<para>
To remove these entries again:
OPERATOR 4 (int2, int4) ,
OPERATOR 5 (int2, int4) ,
FUNCTION 1 (int2, int4) ;
-</programlisting>
+</programlisting>
</refsect1>
<refsect1>