Add more explicit note that the parameters of MOVE are identical to FETCH.
[PostgreSQL.git] / doc / src / sgml / ref / create_opfamily.sgml
blob1c4aa154db5641e8b6b7bddce109dcfc6b4a943f
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="SQL-CREATEOPFAMILY">
7 <refmeta>
8 <refentrytitle id="sql-createopfamily-title">CREATE OPERATOR FAMILY</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
11 </refmeta>
13 <refnamediv>
14 <refname>CREATE OPERATOR FAMILY</refname>
15 <refpurpose>define a new operator family</refpurpose>
16 </refnamediv>
18 <indexterm zone="sql-createopfamily">
19 <primary>CREATE OPERATOR FAMILY</primary>
20 </indexterm>
22 <refsynopsisdiv>
23 <synopsis>
24 CREATE OPERATOR FAMILY <replaceable class="parameter">name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
25 </synopsis>
26 </refsynopsisdiv>
28 <refsect1>
29 <title>Description</title>
31 <para>
32 <command>CREATE OPERATOR FAMILY</command> creates a new operator family.
33 An operator family defines a collection of related operator classes,
34 and perhaps some additional operators and support functions that are
35 compatible with these operator classes but not essential for the
36 functioning of any individual index. (Operators and functions that
37 are essential to indexes should be grouped within the relevant operator
38 class, rather than being <quote>loose</> in the operator family.
39 Typically, single-data-type operators are bound to operator classes,
40 while cross-data-type operators can be loose in an operator family
41 containing operator classes for both data types.)
42 </para>
44 <para>
45 The new operator family is initially empty. It should be populated
46 by issuing subsequent <command>CREATE OPERATOR CLASS</command> commands
47 to add contained operator classes, and optionally
48 <command>ALTER OPERATOR FAMILY</command> commands to add <quote>loose</>
49 operators and their corresponding support functions.
50 </para>
52 <para>
53 If a schema name is given then the operator family is created in the
54 specified schema. Otherwise it is created in the current schema.
55 Two operator families in the same schema can have the same name only if they
56 are for different index methods.
57 </para>
59 <para>
60 The user who defines an operator family becomes its owner. Presently,
61 the creating user must be a superuser. (This restriction is made because
62 an erroneous operator family definition could confuse or even crash the
63 server.)
64 </para>
66 <para>
67 Refer to <xref linkend="xindex"> for further information.
68 </para>
69 </refsect1>
71 <refsect1>
72 <title>Parameters</title>
74 <variablelist>
75 <varlistentry>
76 <term><replaceable class="parameter">name</replaceable></term>
77 <listitem>
78 <para>
79 The name of the operator family to be created. The name can be
80 schema-qualified.
81 </para>
82 </listitem>
83 </varlistentry>
85 <varlistentry>
86 <term><replaceable class="parameter">index_method</replaceable></term>
87 <listitem>
88 <para>
89 The name of the index method this operator family is for.
90 </para>
91 </listitem>
92 </varlistentry>
93 </variablelist>
94 </refsect1>
96 <refsect1>
97 <title>Compatibility</title>
99 <para>
100 <command>CREATE OPERATOR FAMILY</command> is a
101 <productname>PostgreSQL</productname> extension. There is no
102 <command>CREATE OPERATOR FAMILY</command> statement in the SQL
103 standard.
104 </para>
105 </refsect1>
107 <refsect1>
108 <title>See Also</title>
110 <simplelist type="inline">
111 <member><xref linkend="sql-alteropfamily" endterm="sql-alteropfamily-title"></member>
112 <member><xref linkend="sql-dropopfamily" endterm="sql-dropopfamily-title"></member>
113 <member><xref linkend="sql-createopclass" endterm="sql-createopclass-title"></member>
114 <member><xref linkend="sql-alteropclass" endterm="sql-alteropclass-title"></member>
115 <member><xref linkend="sql-dropopclass" endterm="sql-dropopclass-title"></member>
116 </simplelist>
117 </refsect1>
118 </refentry>