1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-22 17:42:17 +03:00
Files
postgres/doc/src/sgml/ref/create_opfamily.sgml
Peter Eisentraut 3c49c6facb Convert documentation to DocBook XML
Since some preparation work had already been done, the only source
changes left were changing empty-element tags like <xref linkend="foo">
to <xref linkend="foo"/>, and changing the DOCTYPE.

The source files are still named *.sgml, but they are actually XML files
now.  Renaming could be considered later.

In the build system, the intermediate step to convert from SGML to XML
is removed.  Everything is build straight from the source files again.
The OpenSP (or the old SP) package is no longer needed.

The documentation toolchain instructions are updated and are much
simpler now.

Peter Eisentraut, Alexander Lakhin, Jürgen Purtz
2017-11-23 09:44:28 -05:00

119 lines
3.6 KiB
Plaintext

<!--
doc/src/sgml/ref/create_opfamily.sgml
PostgreSQL documentation
-->
<refentry id="sql-createopfamily">
<indexterm zone="sql-createopfamily">
<primary>CREATE OPERATOR FAMILY</primary>
</indexterm>
<refmeta>
<refentrytitle>CREATE OPERATOR FAMILY</refentrytitle>
<manvolnum>7</manvolnum>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>CREATE OPERATOR FAMILY</refname>
<refpurpose>define a new operator family</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
CREATE OPERATOR FAMILY <replaceable class="parameter">name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
<command>CREATE OPERATOR FAMILY</command> creates a new operator family.
An operator family defines a collection of related operator classes,
and perhaps some additional operators and support functions that are
compatible with these operator classes but not essential for the
functioning of any individual index. (Operators and functions that
are essential to indexes should be grouped within the relevant operator
class, rather than being <quote>loose</quote> in the operator family.
Typically, single-data-type operators are bound to operator classes,
while cross-data-type operators can be loose in an operator family
containing operator classes for both data types.)
</para>
<para>
The new operator family is initially empty. It should be populated
by issuing subsequent <command>CREATE OPERATOR CLASS</command> commands
to add contained operator classes, and optionally
<command>ALTER OPERATOR FAMILY</command> commands to add <quote>loose</quote>
operators and their corresponding support functions.
</para>
<para>
If a schema name is given then the operator family is created in the
specified schema. Otherwise it is created in the current schema.
Two operator families in the same schema can have the same name only if they
are for different index methods.
</para>
<para>
The user who defines an operator family becomes its owner. Presently,
the creating user must be a superuser. (This restriction is made because
an erroneous operator family definition could confuse or even crash the
server.)
</para>
<para>
Refer to <xref linkend="xindex"/> for further information.
</para>
</refsect1>
<refsect1>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term><replaceable class="parameter">name</replaceable></term>
<listitem>
<para>
The name of the operator family to be created. The name can be
schema-qualified.
</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>
</variablelist>
</refsect1>
<refsect1>
<title>Compatibility</title>
<para>
<command>CREATE OPERATOR FAMILY</command> is a
<productname>PostgreSQL</productname> extension. There is no
<command>CREATE OPERATOR FAMILY</command> statement in the SQL
standard.
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<simplelist type="inline">
<member><xref linkend="sql-alteropfamily"/></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>
</simplelist>
</refsect1>
</refentry>