2002-07-30 00:14:11 +02:00
|
|
|
<!--
|
2010-09-20 22:08:53 +02:00
|
|
|
doc/src/sgml/ref/create_opclass.sgml
|
2002-07-30 00:14:11 +02:00
|
|
|
PostgreSQL documentation
|
|
|
|
-->
|
|
|
|
|
2017-10-20 03:16:39 +02:00
|
|
|
<refentry id="sql-createopclass">
|
2014-02-24 03:25:35 +01:00
|
|
|
<indexterm zone="sql-createopclass">
|
|
|
|
<primary>CREATE OPERATOR CLASS</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
2002-07-30 00:14:11 +02:00
|
|
|
<refmeta>
|
2010-04-03 09:23:02 +02:00
|
|
|
<refentrytitle>CREATE OPERATOR CLASS</refentrytitle>
|
2008-11-14 11:22:48 +01:00
|
|
|
<manvolnum>7</manvolnum>
|
2002-07-30 00:14:11 +02:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
2003-04-22 12:08:08 +02:00
|
|
|
|
2002-07-30 00:14:11 +02:00
|
|
|
<refnamediv>
|
2003-04-22 12:08:08 +02:00
|
|
|
<refname>CREATE OPERATOR CLASS</refname>
|
2003-09-22 02:16:58 +02:00
|
|
|
<refpurpose>define a new operator class</refpurpose>
|
2003-04-22 12:08:08 +02:00
|
|
|
</refnamediv>
|
|
|
|
|
2002-07-30 00:14:11 +02:00
|
|
|
<refsynopsisdiv>
|
2003-04-22 12:08:08 +02:00
|
|
|
<synopsis>
|
2007-01-23 06:07:18 +01:00
|
|
|
CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAULT ] FOR TYPE <replaceable class="parameter">data_type</replaceable>
|
|
|
|
USING <replaceable class="parameter">index_method</replaceable> [ FAMILY <replaceable class="parameter">family_name</replaceable> ] AS
|
2010-11-24 20:20:39 +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> ]
|
2009-09-19 12:23:27 +02:00
|
|
|
| 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> [, ...] )
|
2002-07-30 00:14:11 +02:00
|
|
|
| STORAGE <replaceable class="parameter">storage_type</replaceable>
|
|
|
|
} [, ... ]
|
2003-04-22 12:08:08 +02:00
|
|
|
</synopsis>
|
2002-07-30 00:14:11 +02:00
|
|
|
</refsynopsisdiv>
|
|
|
|
|
2003-04-22 12:08:08 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
2002-07-30 00:14:11 +02:00
|
|
|
<para>
|
2003-04-22 12:08:08 +02:00
|
|
|
<command>CREATE OPERATOR CLASS</command> creates a new operator class.
|
2002-09-21 20:32:54 +02:00
|
|
|
An operator class defines how a particular data type can be used with
|
2002-07-30 00:14:11 +02:00
|
|
|
an index. The operator class specifies that certain operators will fill
|
2017-10-09 03:44:17 +02:00
|
|
|
particular roles or <quote>strategies</quote> for this data type and this
|
2018-08-15 17:01:39 +02:00
|
|
|
index method. The operator class also specifies the support functions to
|
2010-11-23 21:27:50 +01:00
|
|
|
be used by
|
2003-04-22 12:08:08 +02:00
|
|
|
the index method when the operator class is selected for an
|
2002-07-30 00:14:11 +02:00
|
|
|
index column. All the operators and functions used by an operator
|
2007-01-23 06:07:18 +01:00
|
|
|
class must be defined before the operator class can be created.
|
2002-07-30 00:14:11 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If a schema name is given then the operator class is created in the
|
2003-04-22 12:08:08 +02:00
|
|
|
specified schema. Otherwise it is created in the current schema.
|
2002-07-30 00:14:11 +02:00
|
|
|
Two operator classes in the same schema can have the same name only if they
|
2003-04-22 12:08:08 +02:00
|
|
|
are for different index methods.
|
2002-07-30 00:14:11 +02:00
|
|
|
</para>
|
2003-04-22 12:08:08 +02:00
|
|
|
|
2002-07-30 00:14:11 +02:00
|
|
|
<para>
|
2002-10-05 00:19:29 +02:00
|
|
|
The user who defines an operator class becomes its owner. Presently,
|
|
|
|
the creating user must be a superuser. (This restriction is made because
|
|
|
|
an erroneous operator class definition could confuse or even crash the
|
|
|
|
server.)
|
2002-07-30 00:14:11 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>CREATE OPERATOR CLASS</command> does not presently check
|
2006-01-13 19:10:25 +01:00
|
|
|
whether the operator class 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
|
2002-07-30 00:14:11 +02:00
|
|
|
responsibility to define a valid operator class.
|
|
|
|
</para>
|
|
|
|
|
2007-01-23 06:07:18 +01:00
|
|
|
<para>
|
|
|
|
Related operator classes can be grouped into <firstterm>operator
|
2017-10-09 03:44:17 +02:00
|
|
|
families</firstterm>. To add a new operator class to an existing family,
|
|
|
|
specify the <literal>FAMILY</literal> option in <command>CREATE OPERATOR
|
2007-01-23 06:07:18 +01:00
|
|
|
CLASS</command>. Without this option, the new class is placed into
|
|
|
|
a family named the same as the new class (creating that family if
|
|
|
|
it doesn't already exist).
|
|
|
|
</para>
|
|
|
|
|
2002-07-30 00:14:11 +02:00
|
|
|
<para>
|
2017-11-23 15:39:47 +01:00
|
|
|
Refer to <xref linkend="xindex"/> for further information.
|
2002-07-30 00:14:11 +02:00
|
|
|
</para>
|
2003-04-22 12:08:08 +02:00
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2003-04-22 12:08:08 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Parameters</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">name</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
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
|
|
|
The name of the operator class to be created. The name can be
|
2003-04-22 12:08:08 +02:00
|
|
|
schema-qualified.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2017-10-09 03:44:17 +02:00
|
|
|
<term><literal>DEFAULT</literal></term>
|
2003-04-22 12:08:08 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
If present, the operator class will become the default
|
|
|
|
operator class for its data type. At most one operator class
|
|
|
|
can be the default for a specific data type and index method.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">data_type</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The column data type that this operator class is for.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">index_method</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of the index method this operator class is for.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2007-01-23 06:07:18 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">family_name</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of the existing operator family to add this operator class to.
|
|
|
|
If not specified, a family named the same as the operator class is
|
|
|
|
used (creating it, if it doesn't already exist).
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2003-04-22 12:08:08 +02:00
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">strategy_number</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The index method's strategy number for an operator
|
|
|
|
associated with the operator class.
|
|
|
|
</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 class.
|
|
|
|
</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
|
Remove support for postfix (right-unary) operators.
This feature has been a thorn in our sides for a long time, causing
many grammatical ambiguity problems. It doesn't seem worth the
pain to continue to support it, so remove it.
There are some follow-on improvements we can make in the grammar,
but this commit only removes the bare minimum number of productions,
plus assorted backend support code.
Note that pg_dump and psql continue to have full support, since
they may be used against older servers. However, pg_dump warns
about postfix operators. There is also a check in pg_upgrade.
Documentation-wise, I (tgl) largely removed the "left unary"
terminology in favor of saying "prefix operator", which is
a more standard and IMO less confusing term.
I included a catversion bump, although no initial catalog data
changes here, to mark the boundary at which oprkind = 'r'
stopped being valid in pg_operator.
Mark Dilger, based on work by myself and Robert Haas;
review by John Naylor
Discussion: https://postgr.es/m/38ca86db-42ab-9b48-2902-337a0d6b8311@2ndquadrant.com
2020-09-18 01:38:05 +02:00
|
|
|
signify a prefix operator. The operand data
|
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
|
|
|
types can be omitted in the normal case where they are the same
|
2003-04-22 12:08:08 +02:00
|
|
|
as the operator class's data type.
|
|
|
|
</para>
|
2007-01-23 06:07:18 +01:00
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
In a <literal>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)
|
2020-02-26 20:28:25 +01:00
|
|
|
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.
|
2007-01-23 06:07:18 +01:00
|
|
|
</para>
|
2003-04-22 12:08:08 +02:00
|
|
|
</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>
|
|
|
|
|
2003-04-22 12:08:08 +02:00
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">support_number</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2018-08-15 17:01:39 +02:00
|
|
|
The index method's support function number for a
|
2003-04-22 12:08:08 +02:00
|
|
|
function associated with the operator class.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable class="parameter">function_name</replaceable></term>
|
2003-04-22 12:08:08 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name (optionally schema-qualified) of a function that is an
|
2018-08-15 17:01:39 +02:00
|
|
|
index method support function for the operator class.
|
2003-04-22 12:08:08 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable class="parameter">argument_type</replaceable></term>
|
2003-04-22 12:08:08 +02:00
|
|
|
<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
|
2016-03-10 17:15:08 +01:00
|
|
|
(currently GiST, GIN and BRIN) allow it to be different. The
|
2017-10-09 03:44:17 +02:00
|
|
|
<literal>STORAGE</literal> clause must be omitted unless the index
|
2003-04-22 12:08:08 +02:00
|
|
|
method allows a different type to be used.
|
2017-10-09 03:44:17 +02:00
|
|
|
If the column <replaceable class="parameter">data_type</replaceable> is specified
|
|
|
|
as <type>anyarray</type>, the <replaceable class="parameter">storage_type</replaceable>
|
|
|
|
can be declared as <type>anyelement</type> to indicate that the index
|
Replace the built-in GIN array opclasses with a single polymorphic opclass.
We had thirty different GIN array opclasses sharing the same operators and
support functions. That still didn't cover all the built-in types, nor
did it cover arrays of extension-added types. What we want is a single
polymorphic opclass for "anyarray". There were two missing features needed
to make this possible:
1. We have to be able to declare the index storage type as ANYELEMENT
when the opclass is declared to index ANYARRAY. This just takes a few
more lines in index_create(). Although this currently seems of use only
for GIN, there's no reason to make index_create() restrict it to that.
2. We have to be able to identify the proper GIN compare function for
the index storage type. This patch proceeds by making the compare function
optional in GIN opclass definitions, and specifying that the default btree
comparison function for the index storage type will be looked up when the
opclass omits it. Again, that seems pretty generically useful.
Since the comparison function lookup is done in initGinState(), making
use of the second feature adds an additional cache lookup to GIN index
access setup. It seems unlikely that that would be very noticeable given
the other costs involved, but maybe at some point we should consider
making GinState data persist longer than it now does --- we could keep it
in the index relcache entry, perhaps.
Rather fortuitously, we don't seem to need to do anything to get this
change to play nice with dump/reload or pg_upgrade scenarios: the new
opclass definition is automatically selected to replace existing index
definitions, and the on-disk data remains compatible. Also, if a user has
created a custom opclass definition for a non-builtin type, this doesn't
break that, since CREATE INDEX will prefer an exact match to opcintype
over a match to ANYARRAY. However, if there's anyone out there with
handwritten DDL that explicitly specifies _bool_ops or one of the other
replaced opclass names, they'll need to adjust that.
Tom Lane, reviewed by Enrique Meneses
Discussion: <14436.1470940379@sss.pgh.pa.us>
2016-09-26 20:52:44 +02:00
|
|
|
entries are members of the element type belonging to the actual array
|
|
|
|
type that each particular index is created for.
|
2003-04-22 12:08:08 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>
|
2017-10-09 03:44:17 +02:00
|
|
|
The <literal>OPERATOR</literal>, <literal>FUNCTION</literal>, and <literal>STORAGE</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.
|
2003-04-22 12:08:08 +02:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2005-01-14 02:16:52 +01:00
|
|
|
<refsect1>
|
|
|
|
<title>Notes</title>
|
|
|
|
|
2006-01-13 19:10:25 +01:00
|
|
|
<para>
|
|
|
|
Because the index machinery does not check access permissions on functions
|
|
|
|
before using them, including a function or operator in an operator class
|
|
|
|
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
|
|
|
|
class.
|
|
|
|
</para>
|
|
|
|
|
2005-01-14 02:16:52 +01:00
|
|
|
<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>
|
2005-01-14 02:16:52 +01:00
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2003-04-22 12:08:08 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Examples</title>
|
|
|
|
|
2002-07-30 00:14:11 +02:00
|
|
|
<para>
|
|
|
|
The following example command defines a GiST index operator class
|
2017-10-09 03:44:17 +02:00
|
|
|
for the data type <literal>_int4</literal> (array of <type>int4</type>). See the
|
2017-11-23 15:39:47 +01:00
|
|
|
<xref linkend="intarray"/> module for the complete example.
|
2002-07-30 00:14:11 +02:00
|
|
|
</para>
|
|
|
|
|
2003-04-22 12:08:08 +02:00
|
|
|
<programlisting>
|
2002-07-30 00:14:11 +02:00
|
|
|
CREATE OPERATOR CLASS gist__int_ops
|
|
|
|
DEFAULT FOR TYPE _int4 USING gist AS
|
2007-12-04 00:49:51 +01:00
|
|
|
OPERATOR 3 &&,
|
2008-04-14 19:05:34 +02:00
|
|
|
OPERATOR 6 = (anyarray, anyarray),
|
2006-10-16 19:28:03 +02:00
|
|
|
OPERATOR 7 @>,
|
|
|
|
OPERATOR 8 <@,
|
2002-07-30 00:14:11 +02:00
|
|
|
OPERATOR 20 @@ (_int4, query_int),
|
Fix assorted inconsistencies in GiST opclass support function declarations.
The conventions specified by the GiST SGML documentation were widely
ignored. For example, the strategy-number argument for "consistent" and
"distance" functions is specified to be a smallint, but most of the
built-in support functions declared it as an integer, and for that matter
the core code passed it using Int32GetDatum not Int16GetDatum. None of
that makes any real difference at runtime, but it's quite confusing for
newcomers to the code, and it makes it very hard to write an amvalidate()
function that checks support function signatures. So let's try to instill
some consistency here.
Another similar issue is that the "query" argument is not of a single
well-defined type, but could have different types depending on the strategy
(corresponding to search operators with different righthand-side argument
types). Some of the functions threw up their hands and declared the query
argument as being of "internal" type, which surely isn't right ("any" would
have been more appropriate); but the majority position seemed to be to
declare it as being of the indexed data type, corresponding to a search
operator with both input types the same. So I've specified a convention
that that's what to do always.
Also, the result of the "union" support function actually must be of the
index's storage type, but the documentation suggested declaring it to
return "internal", and some of the functions followed that. Standardize
on telling the truth, instead.
Similarly, standardize on declaring the "same" function's inputs as
being of the storage type, not "internal".
Also, somebody had forgotten to add the "recheck" argument to both
the documentation of the "distance" support function and all of their
SQL declarations, even though the C code was happily using that argument.
Clean that up too.
Fix up some other omissions in the docs too, such as documenting that
union's second input argument is vestigial.
So far as the errors in core function declarations go, we can just fix
pg_proc.h and bump catversion. Adjusting the erroneous declarations in
contrib modules is more debatable: in principle any change in those
scripts should involve an extension version bump, which is a pain.
However, since these changes are purely cosmetic and make no functional
difference, I think we can get away without doing that.
2016-01-19 18:04:32 +01:00
|
|
|
FUNCTION 1 g_int_consistent (internal, _int4, smallint, oid, internal),
|
2008-04-14 19:05:34 +02:00
|
|
|
FUNCTION 2 g_int_union (internal, internal),
|
2002-08-22 02:01:51 +02:00
|
|
|
FUNCTION 3 g_int_compress (internal),
|
|
|
|
FUNCTION 4 g_int_decompress (internal),
|
|
|
|
FUNCTION 5 g_int_penalty (internal, internal, internal),
|
|
|
|
FUNCTION 6 g_int_picksplit (internal, internal),
|
|
|
|
FUNCTION 7 g_int_same (_int4, _int4, internal);
|
2010-11-23 21:27:50 +01:00
|
|
|
</programlisting>
|
2002-07-30 00:14:11 +02:00
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2003-04-22 12:08:08 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Compatibility</title>
|
2002-07-30 00:14:11 +02:00
|
|
|
|
2003-04-22 12:08:08 +02:00
|
|
|
<para>
|
|
|
|
<command>CREATE OPERATOR CLASS</command> is a
|
|
|
|
<productname>PostgreSQL</productname> extension. There is no
|
|
|
|
<command>CREATE OPERATOR CLASS</command> statement in the SQL
|
|
|
|
standard.
|
|
|
|
</para>
|
2002-07-30 00:14:11 +02:00
|
|
|
</refsect1>
|
2003-06-27 16:45:32 +02:00
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See Also</title>
|
|
|
|
|
|
|
|
<simplelist type="inline">
|
2017-11-23 15:39:47 +01:00
|
|
|
<member><xref linkend="sql-alteropclass"/></member>
|
|
|
|
<member><xref linkend="sql-dropopclass"/></member>
|
|
|
|
<member><xref linkend="sql-createopfamily"/></member>
|
|
|
|
<member><xref linkend="sql-alteropfamily"/></member>
|
2003-06-27 16:45:32 +02:00
|
|
|
</simplelist>
|
|
|
|
</refsect1>
|
2002-07-30 00:14:11 +02:00
|
|
|
</refentry>
|