2007-01-23 06:07:18 +01:00
|
|
|
<!--
|
2010-09-20 22:08:53 +02:00
|
|
|
doc/src/sgml/ref/alter_opfamily.sgml
|
2007-01-23 06:07:18 +01:00
|
|
|
PostgreSQL documentation
|
|
|
|
-->
|
|
|
|
|
2017-10-20 03:16:39 +02:00
|
|
|
<refentry id="sql-alteropfamily">
|
2014-02-24 03:25:35 +01:00
|
|
|
<indexterm zone="sql-alteropfamily">
|
|
|
|
<primary>ALTER OPERATOR FAMILY</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
2007-01-23 06:07:18 +01:00
|
|
|
<refmeta>
|
2010-04-03 09:23:02 +02:00
|
|
|
<refentrytitle>ALTER OPERATOR FAMILY</refentrytitle>
|
2008-11-14 11:22:48 +01:00
|
|
|
<manvolnum>7</manvolnum>
|
2007-01-23 06:07:18 +01:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>ALTER OPERATOR FAMILY</refname>
|
|
|
|
<refpurpose>change the definition of an operator family</refpurpose>
|
2010-11-23 21:27:50 +01:00
|
|
|
</refnamediv>
|
|
|
|
|
2007-01-23 06:07:18 +01:00
|
|
|
<refsynopsisdiv>
|
|
|
|
<synopsis>
|
|
|
|
ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> ADD
|
Allow CURRENT/SESSION_USER to be used in certain commands
Commands such as ALTER USER, ALTER GROUP, ALTER ROLE, GRANT, and the
various ALTER OBJECT / OWNER TO, as well as ad-hoc clauses related to
roles such as the AUTHORIZATION clause of CREATE SCHEMA, the FOR clause
of CREATE USER MAPPING, and the FOR ROLE clause of ALTER DEFAULT
PRIVILEGES can now take the keywords CURRENT_USER and SESSION_USER as
user specifiers in place of an explicit user name.
This commit also fixes some quite ugly handling of special standards-
mandated syntax in CREATE USER MAPPING, which in particular would fail
to work in presence of a role named "current_user".
The special role specifiers PUBLIC and NONE also have more consistent
handling now.
Also take the opportunity to add location tracking to user specifiers.
Authors: Kyotaro Horiguchi. Heavily reworked by Álvaro Herrera.
Reviewed by: Rushabh Lathia, Adam Brightwell, Marti Raudsepp.
2015-03-09 19:41:54 +01:00
|
|
|
{ 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> ] ) ]
|
2017-03-10 05:58:48 +01:00
|
|
|
<replaceable class="parameter">function_name</replaceable> [ ( <replaceable class="parameter">argument_type</replaceable> [, ...] ) ]
|
2007-01-23 06:07:18 +01:00
|
|
|
} [, ... ]
|
Allow CURRENT/SESSION_USER to be used in certain commands
Commands such as ALTER USER, ALTER GROUP, ALTER ROLE, GRANT, and the
various ALTER OBJECT / OWNER TO, as well as ad-hoc clauses related to
roles such as the AUTHORIZATION clause of CREATE SCHEMA, the FOR clause
of CREATE USER MAPPING, and the FOR ROLE clause of ALTER DEFAULT
PRIVILEGES can now take the keywords CURRENT_USER and SESSION_USER as
user specifiers in place of an explicit user name.
This commit also fixes some quite ugly handling of special standards-
mandated syntax in CREATE USER MAPPING, which in particular would fail
to work in presence of a role named "current_user".
The special role specifiers PUBLIC and NONE also have more consistent
handling now.
Also take the opportunity to add location tracking to user specifiers.
Authors: Kyotaro Horiguchi. Heavily reworked by Álvaro Herrera.
Reviewed by: Rushabh Lathia, Adam Brightwell, Marti Raudsepp.
2015-03-09 19:41:54 +01:00
|
|
|
|
2007-01-23 06:07:18 +01:00
|
|
|
ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> DROP
|
|
|
|
{ OPERATOR <replaceable class="parameter">strategy_number</replaceable> ( <replaceable class="parameter">op_type</replaceable> [ , <replaceable class="parameter">op_type</replaceable> ] )
|
|
|
|
| FUNCTION <replaceable class="parameter">support_number</replaceable> ( <replaceable class="parameter">op_type</replaceable> [ , <replaceable class="parameter">op_type</replaceable> ] )
|
|
|
|
} [, ... ]
|
Allow CURRENT/SESSION_USER to be used in certain commands
Commands such as ALTER USER, ALTER GROUP, ALTER ROLE, GRANT, and the
various ALTER OBJECT / OWNER TO, as well as ad-hoc clauses related to
roles such as the AUTHORIZATION clause of CREATE SCHEMA, the FOR clause
of CREATE USER MAPPING, and the FOR ROLE clause of ALTER DEFAULT
PRIVILEGES can now take the keywords CURRENT_USER and SESSION_USER as
user specifiers in place of an explicit user name.
This commit also fixes some quite ugly handling of special standards-
mandated syntax in CREATE USER MAPPING, which in particular would fail
to work in presence of a role named "current_user".
The special role specifiers PUBLIC and NONE also have more consistent
handling now.
Also take the opportunity to add location tracking to user specifiers.
Authors: Kyotaro Horiguchi. Heavily reworked by Álvaro Herrera.
Reviewed by: Rushabh Lathia, Adam Brightwell, Marti Raudsepp.
2015-03-09 19:41:54 +01:00
|
|
|
|
|
|
|
ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
|
2015-07-10 13:28:34 +02:00
|
|
|
RENAME TO <replaceable>new_name</replaceable>
|
Allow CURRENT/SESSION_USER to be used in certain commands
Commands such as ALTER USER, ALTER GROUP, ALTER ROLE, GRANT, and the
various ALTER OBJECT / OWNER TO, as well as ad-hoc clauses related to
roles such as the AUTHORIZATION clause of CREATE SCHEMA, the FOR clause
of CREATE USER MAPPING, and the FOR ROLE clause of ALTER DEFAULT
PRIVILEGES can now take the keywords CURRENT_USER and SESSION_USER as
user specifiers in place of an explicit user name.
This commit also fixes some quite ugly handling of special standards-
mandated syntax in CREATE USER MAPPING, which in particular would fail
to work in presence of a role named "current_user".
The special role specifiers PUBLIC and NONE also have more consistent
handling now.
Also take the opportunity to add location tracking to user specifiers.
Authors: Kyotaro Horiguchi. Heavily reworked by Álvaro Herrera.
Reviewed by: Rushabh Lathia, Adam Brightwell, Marti Raudsepp.
2015-03-09 19:41:54 +01:00
|
|
|
|
|
|
|
ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
|
2015-07-10 13:28:34 +02:00
|
|
|
OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_USER | SESSION_USER }
|
Allow CURRENT/SESSION_USER to be used in certain commands
Commands such as ALTER USER, ALTER GROUP, ALTER ROLE, GRANT, and the
various ALTER OBJECT / OWNER TO, as well as ad-hoc clauses related to
roles such as the AUTHORIZATION clause of CREATE SCHEMA, the FOR clause
of CREATE USER MAPPING, and the FOR ROLE clause of ALTER DEFAULT
PRIVILEGES can now take the keywords CURRENT_USER and SESSION_USER as
user specifiers in place of an explicit user name.
This commit also fixes some quite ugly handling of special standards-
mandated syntax in CREATE USER MAPPING, which in particular would fail
to work in presence of a role named "current_user".
The special role specifiers PUBLIC and NONE also have more consistent
handling now.
Also take the opportunity to add location tracking to user specifiers.
Authors: Kyotaro Horiguchi. Heavily reworked by Álvaro Herrera.
Reviewed by: Rushabh Lathia, Adam Brightwell, Marti Raudsepp.
2015-03-09 19:41:54 +01:00
|
|
|
|
|
|
|
ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
|
2015-07-10 13:28:34 +02:00
|
|
|
SET SCHEMA <replaceable>new_schema</replaceable>
|
2007-01-23 06:07:18 +01:00
|
|
|
</synopsis>
|
|
|
|
</refsynopsisdiv>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2007-01-23 06:07:18 +01:00
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>ALTER OPERATOR FAMILY</command> changes the definition of
|
|
|
|
an operator family. You can add operators and support functions
|
|
|
|
to the family, remove them from the family,
|
|
|
|
or change the family's name or owner.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
When operators and support functions are added to a family with
|
|
|
|
<command>ALTER OPERATOR FAMILY</command>, they are not part of any
|
2017-10-09 03:44:17 +02:00
|
|
|
specific operator class within the family, but are just <quote>loose</quote>
|
2007-01-23 06:07:18 +01:00
|
|
|
within the family. This indicates that these operators and functions
|
|
|
|
are compatible with the family's semantics, but are not required for
|
|
|
|
correct functioning of any specific index. (Operators and functions
|
|
|
|
that are so required should be declared as part of an operator class,
|
2017-11-23 15:39:47 +01:00
|
|
|
instead; see <xref linkend="sql-createopclass"/>.)
|
2007-01-23 06:07:18 +01:00
|
|
|
<productname>PostgreSQL</productname> will allow loose members of a
|
|
|
|
family to be dropped from the family at any time, but members of an
|
|
|
|
operator class cannot be dropped without dropping the whole class and
|
|
|
|
any indexes that depend on it.
|
|
|
|
Typically, single-data-type operators
|
|
|
|
and functions are part of operator classes because they are needed to
|
|
|
|
support an index on that specific data type, while cross-data-type
|
|
|
|
operators and functions are made loose members of the family.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
You must be a superuser to use <command>ALTER OPERATOR FAMILY</command>.
|
2007-02-14 05:30:26 +01:00
|
|
|
(This restriction is made because an erroneous operator family definition
|
|
|
|
could confuse or even crash the server.)
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>ALTER OPERATOR FAMILY</command> does not presently check
|
|
|
|
whether the operator family definition includes all the operators and
|
|
|
|
functions required by the index method, nor whether the operators and
|
|
|
|
functions form a self-consistent set. It is the user's
|
|
|
|
responsibility to define a valid operator family.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2017-11-23 15:39:47 +01:00
|
|
|
Refer to <xref linkend="xindex"/> for further information.
|
2007-01-23 06:07:18 +01:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2007-01-23 06:07:18 +01:00
|
|
|
<refsect1>
|
|
|
|
<title>Parameters</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">name</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name (optionally schema-qualified) of an existing operator
|
|
|
|
family.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">index_method</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of the index method this operator family is for.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">strategy_number</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The index method's strategy number for an operator
|
|
|
|
associated with the operator family.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">operator_name</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name (optionally schema-qualified) of an operator associated
|
|
|
|
with the operator family.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">op_type</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
In an <literal>OPERATOR</literal> clause,
|
|
|
|
the operand data type(s) of the operator, or <literal>NONE</literal> to
|
2007-01-23 06:07:18 +01:00
|
|
|
signify a left-unary or right-unary operator. Unlike the comparable
|
2017-10-09 03:44:17 +02:00
|
|
|
syntax in <command>CREATE OPERATOR CLASS</command>, the operand data types
|
2007-01-23 06:07:18 +01:00
|
|
|
must always be specified.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
In an <literal>ADD FUNCTION</literal> clause, the operand data type(s) the
|
2007-01-23 06:07:18 +01:00
|
|
|
function is intended to support, if different from
|
2011-12-07 06:18:38 +01:00
|
|
|
the input data type(s) of the function. For B-tree comparison functions
|
|
|
|
and hash functions it is not necessary to specify <replaceable
|
2007-01-23 06:07:18 +01:00
|
|
|
class="parameter">op_type</replaceable> since the function's input
|
2011-12-07 06:18:38 +01:00
|
|
|
data type(s) are always the correct ones to use. For B-tree sort
|
2011-12-17 22:41:16 +01:00
|
|
|
support functions and all functions in GiST, SP-GiST and GIN operator
|
|
|
|
classes, it is necessary to specify the operand data type(s) the function
|
2007-01-23 06:07:18 +01:00
|
|
|
is to be used with.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
In a <literal>DROP FUNCTION</literal> clause, the operand data type(s) the
|
2007-01-23 06:07:18 +01:00
|
|
|
function is intended to support must be specified.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2010-11-24 20:20:39 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">sort_family_name</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2011-05-19 00:14:45 +02:00
|
|
|
The name (optionally schema-qualified) of an existing <literal>btree</literal> operator
|
2010-11-24 20:20:39 +01:00
|
|
|
family that describes the sort ordering associated with an ordering
|
|
|
|
operator.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
If neither <literal>FOR SEARCH</literal> nor <literal>FOR ORDER BY</literal> is
|
|
|
|
specified, <literal>FOR SEARCH</literal> is the default.
|
2010-11-24 20:20:39 +01:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2007-01-23 06:07:18 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">support_number</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The index method's support procedure number for a
|
|
|
|
function associated with the operator family.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable class="parameter">function_name</replaceable></term>
|
2007-01-23 06:07:18 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2017-03-10 05:58:48 +01:00
|
|
|
The name (optionally schema-qualified) of a function that is an index
|
|
|
|
method support procedure for the operator family. If no argument list
|
|
|
|
is specified, the name must be unique in its schema.
|
2007-01-23 06:07:18 +01:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable class="parameter">argument_type</replaceable></term>
|
2007-01-23 06:07:18 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The parameter data type(s) of the function.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable class="parameter">new_name</replaceable></term>
|
2007-01-23 06:07:18 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The new name of the operator family.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable class="parameter">new_owner</replaceable></term>
|
2007-01-23 06:07:18 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The new owner of the operator family.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2010-11-26 23:27:23 +01:00
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">new_schema</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The new schema for the operator family.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2007-01-23 06:07:18 +01:00
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
The <literal>OPERATOR</literal> and <literal>FUNCTION</literal>
|
Update reference documentation on may/can/might:
Standard English uses "may", "can", and "might" in different ways:
may - permission, "You may borrow my rake."
can - ability, "I can lift that log."
might - possibility, "It might rain today."
Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice. Similarly, "It may crash" is better stated, "It might crash".
2007-02-01 00:26:05 +01:00
|
|
|
clauses can appear in any order.
|
2007-01-23 06:07:18 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2007-01-23 06:07:18 +01:00
|
|
|
<refsect1>
|
|
|
|
<title>Notes</title>
|
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
Notice that the <literal>DROP</literal> syntax only specifies the <quote>slot</quote>
|
2007-01-23 06:07:18 +01:00
|
|
|
in the operator family, by strategy or support number and input data
|
|
|
|
type(s). The name of the operator or function occupying the slot is not
|
2017-10-09 03:44:17 +02:00
|
|
|
mentioned. Also, for <literal>DROP FUNCTION</literal> the type(s) to specify
|
2007-01-23 06:07:18 +01:00
|
|
|
are the input data type(s) the function is intended to support; for
|
2011-12-17 22:41:16 +01:00
|
|
|
GiST, SP-GiST and GIN indexes this might have nothing to do with the actual
|
|
|
|
input argument types of the function.
|
2007-01-23 06:07:18 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Because the index machinery does not check access permissions on functions
|
|
|
|
before using them, including a function or operator in an operator family
|
|
|
|
is tantamount to granting public execute permission on it. This is usually
|
|
|
|
not an issue for the sorts of functions that are useful in an operator
|
|
|
|
family.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The operators should not be defined by SQL functions. A SQL function
|
|
|
|
is likely to be inlined into the calling query, which will prevent
|
|
|
|
the optimizer from recognizing that the query matches an index.
|
|
|
|
</para>
|
2008-04-14 19:05:34 +02:00
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
Before <productname>PostgreSQL</productname> 8.4, the <literal>OPERATOR</literal>
|
|
|
|
clause could include a <literal>RECHECK</literal> option. This is no longer
|
|
|
|
supported because whether an index operator is <quote>lossy</quote> is now
|
2010-08-17 06:37:21 +02:00
|
|
|
determined on-the-fly at run time. This allows efficient handling of
|
2008-04-14 19:05:34 +02:00
|
|
|
cases where an operator might or might not be lossy.
|
|
|
|
</para>
|
2007-01-23 06:07:18 +01:00
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2007-01-23 06:07:18 +01:00
|
|
|
<refsect1>
|
|
|
|
<title>Examples</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The following example command adds cross-data-type operators and
|
|
|
|
support functions to an operator family that already contains B-tree
|
2017-10-09 03:44:17 +02:00
|
|
|
operator classes for data types <type>int4</type> and <type>int2</type>.
|
2007-01-23 06:07:18 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<programlisting>
|
|
|
|
ALTER OPERATOR FAMILY integer_ops USING btree ADD
|
|
|
|
|
|
|
|
-- int4 vs int2
|
|
|
|
OPERATOR 1 < (int4, int2) ,
|
|
|
|
OPERATOR 2 <= (int4, int2) ,
|
|
|
|
OPERATOR 3 = (int4, int2) ,
|
|
|
|
OPERATOR 4 >= (int4, int2) ,
|
|
|
|
OPERATOR 5 > (int4, int2) ,
|
|
|
|
FUNCTION 1 btint42cmp(int4, int2) ,
|
|
|
|
|
|
|
|
-- int2 vs int4
|
|
|
|
OPERATOR 1 < (int2, int4) ,
|
|
|
|
OPERATOR 2 <= (int2, int4) ,
|
|
|
|
OPERATOR 3 = (int2, int4) ,
|
|
|
|
OPERATOR 4 >= (int2, int4) ,
|
|
|
|
OPERATOR 5 > (int2, int4) ,
|
|
|
|
FUNCTION 1 btint24cmp(int2, int4) ;
|
2010-11-23 21:27:50 +01:00
|
|
|
</programlisting>
|
2007-01-23 06:07:18 +01:00
|
|
|
|
|
|
|
<para>
|
|
|
|
To remove these entries again:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<programlisting>
|
|
|
|
ALTER OPERATOR FAMILY integer_ops USING btree DROP
|
|
|
|
|
|
|
|
-- int4 vs int2
|
|
|
|
OPERATOR 1 (int4, int2) ,
|
|
|
|
OPERATOR 2 (int4, int2) ,
|
|
|
|
OPERATOR 3 (int4, int2) ,
|
|
|
|
OPERATOR 4 (int4, int2) ,
|
|
|
|
OPERATOR 5 (int4, int2) ,
|
|
|
|
FUNCTION 1 (int4, int2) ,
|
|
|
|
|
|
|
|
-- int2 vs int4
|
|
|
|
OPERATOR 1 (int2, int4) ,
|
|
|
|
OPERATOR 2 (int2, int4) ,
|
|
|
|
OPERATOR 3 (int2, int4) ,
|
|
|
|
OPERATOR 4 (int2, int4) ,
|
|
|
|
OPERATOR 5 (int2, int4) ,
|
|
|
|
FUNCTION 1 (int2, int4) ;
|
2010-11-23 21:27:50 +01:00
|
|
|
</programlisting>
|
2007-01-23 06:07:18 +01:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Compatibility</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
There is no <command>ALTER OPERATOR FAMILY</command> statement in
|
|
|
|
the SQL standard.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See Also</title>
|
|
|
|
|
|
|
|
<simplelist type="inline">
|
2017-11-23 15:39:47 +01:00
|
|
|
<member><xref linkend="sql-createopfamily"/></member>
|
|
|
|
<member><xref linkend="sql-dropopfamily"/></member>
|
|
|
|
<member><xref linkend="sql-createopclass"/></member>
|
|
|
|
<member><xref linkend="sql-alteropclass"/></member>
|
|
|
|
<member><xref linkend="sql-dropopclass"/></member>
|
2007-01-23 06:07:18 +01:00
|
|
|
</simplelist>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|