]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/alter_opclass.sgml
Create a "sort support" interface API for faster sorting.
[postgresql] / doc / src / sgml / ref / alter_opclass.sgml
1 <!--
2 doc/src/sgml/ref/alter_opclass.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-ALTEROPCLASS">
7  <refmeta>
8   <refentrytitle>ALTER OPERATOR CLASS</refentrytitle>
9   <manvolnum>7</manvolnum>
10   <refmiscinfo>SQL - Language Statements</refmiscinfo>
11  </refmeta>
12
13  <refnamediv>
14   <refname>ALTER OPERATOR CLASS</refname>
15   <refpurpose>change the definition of an operator class</refpurpose>
16  </refnamediv>
17
18  <indexterm zone="sql-alteropclass">
19   <primary>ALTER OPERATOR CLASS</primary>
20  </indexterm>
21
22  <refsynopsisdiv>
23 <synopsis>
24 ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> RENAME TO <replaceable>new_name</replaceable>
25 ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> OWNER TO <replaceable>new_owner</replaceable>
26 ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> SET SCHEMA <replaceable>new_schema</replaceable>
27 </synopsis>
28  </refsynopsisdiv>
29
30  <refsect1>
31   <title>Description</title>
32
33   <para>
34    <command>ALTER OPERATOR CLASS</command> changes the definition of
35    an operator class.
36   </para>
37
38   <para>
39    You must own the operator class to use <command>ALTER OPERATOR CLASS</>.
40    To alter the owner, you must also be a direct or indirect member of the new
41    owning role, and that role must have <literal>CREATE</literal> privilege on
42    the operator class's schema.  (These restrictions enforce that altering the
43    owner doesn't do anything you couldn't do by dropping and recreating the
44    operator class.  However, a superuser can alter ownership of any operator
45    class anyway.)
46   </para>
47  </refsect1>
48
49  <refsect1>
50   <title>Parameters</title>
51
52   <variablelist>
53    <varlistentry>
54     <term><replaceable class="parameter">name</replaceable></term>
55     <listitem>
56      <para>
57       The name (optionally schema-qualified) of an existing operator
58       class.
59      </para>
60     </listitem>
61    </varlistentry>
62
63    <varlistentry>
64     <term><replaceable class="parameter">index_method</replaceable></term>
65     <listitem>
66      <para>
67       The name of the index method this operator class is for.
68      </para>
69     </listitem>
70    </varlistentry>
71
72    <varlistentry>
73     <term><replaceable class="parameter">new_name</replaceable></term>
74     <listitem>
75      <para>
76       The new name of the operator class.
77      </para>
78     </listitem>
79    </varlistentry>
80
81    <varlistentry>
82     <term><replaceable class="parameter">new_owner</replaceable></term>
83     <listitem>
84      <para>
85       The new owner of the operator class.
86      </para>
87     </listitem>
88    </varlistentry>
89
90    <varlistentry>
91     <term><replaceable class="parameter">new_schema</replaceable></term>
92     <listitem>
93      <para>
94       The new schema for the operator class.
95      </para>
96     </listitem>
97    </varlistentry>
98  </variablelist>
99  </refsect1>
100
101  <refsect1>
102   <title>Compatibility</title>
103
104   <para>
105    There is no <command>ALTER OPERATOR CLASS</command> statement in
106    the SQL standard.
107   </para>
108  </refsect1>
109
110  <refsect1>
111   <title>See Also</title>
112
113   <simplelist type="inline">
114    <member><xref linkend="sql-createopclass"></member>
115    <member><xref linkend="sql-dropopclass"></member>
116    <member><xref linkend="sql-alteropfamily"></member>
117   </simplelist>
118  </refsect1>
119 </refentry>