doc: ALTER DEFAULT PRIVILEGES does not affect inherited roles
[pgsql.git] / doc / src / sgml / ref / alter_opclass.sgml
blob231597d629f78fdc1ae813b8ea19c221eb9ac3dc
1 <!--
2 doc/src/sgml/ref/alter_opclass.sgml
3 PostgreSQL documentation
4 -->
6 <refentry id="sql-alteropclass">
7 <indexterm zone="sql-alteropclass">
8 <primary>ALTER OPERATOR CLASS</primary>
9 </indexterm>
11 <refmeta>
12 <refentrytitle>ALTER OPERATOR CLASS</refentrytitle>
13 <manvolnum>7</manvolnum>
14 <refmiscinfo>SQL - Language Statements</refmiscinfo>
15 </refmeta>
17 <refnamediv>
18 <refname>ALTER OPERATOR CLASS</refname>
19 <refpurpose>change the definition of an operator class</refpurpose>
20 </refnamediv>
22 <refsynopsisdiv>
23 <synopsis>
24 ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
25 RENAME TO <replaceable>new_name</replaceable>
27 ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
28 OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
30 ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable>
31 SET SCHEMA <replaceable>new_schema</replaceable>
32 </synopsis>
33 </refsynopsisdiv>
35 <refsect1>
36 <title>Description</title>
38 <para>
39 <command>ALTER OPERATOR CLASS</command> changes the definition of
40 an operator class.
41 </para>
43 <para>
44 You must own the operator class to use <command>ALTER OPERATOR CLASS</command>.
45 To alter the owner, you must be able to <literal>SET ROLE</literal> to the
46 new owning role, and that role must have <literal>CREATE</literal>
47 privilege on the operator class's schema.
48 (These restrictions enforce that altering the
49 owner doesn't do anything you couldn't do by dropping and recreating the
50 operator class. However, a superuser can alter ownership of any operator
51 class anyway.)
52 </para>
53 </refsect1>
55 <refsect1>
56 <title>Parameters</title>
58 <variablelist>
59 <varlistentry>
60 <term><replaceable class="parameter">name</replaceable></term>
61 <listitem>
62 <para>
63 The name (optionally schema-qualified) of an existing operator
64 class.
65 </para>
66 </listitem>
67 </varlistentry>
69 <varlistentry>
70 <term><replaceable class="parameter">index_method</replaceable></term>
71 <listitem>
72 <para>
73 The name of the index method this operator class is for.
74 </para>
75 </listitem>
76 </varlistentry>
78 <varlistentry>
79 <term><replaceable class="parameter">new_name</replaceable></term>
80 <listitem>
81 <para>
82 The new name of the operator class.
83 </para>
84 </listitem>
85 </varlistentry>
87 <varlistentry>
88 <term><replaceable class="parameter">new_owner</replaceable></term>
89 <listitem>
90 <para>
91 The new owner of the operator class.
92 </para>
93 </listitem>
94 </varlistentry>
96 <varlistentry>
97 <term><replaceable class="parameter">new_schema</replaceable></term>
98 <listitem>
99 <para>
100 The new schema for the operator class.
101 </para>
102 </listitem>
103 </varlistentry>
104 </variablelist>
105 </refsect1>
107 <refsect1>
108 <title>Compatibility</title>
110 <para>
111 There is no <command>ALTER OPERATOR CLASS</command> statement in
112 the SQL standard.
113 </para>
114 </refsect1>
116 <refsect1>
117 <title>See Also</title>
119 <simplelist type="inline">
120 <member><xref linkend="sql-createopclass"/></member>
121 <member><xref linkend="sql-dropopclass"/></member>
122 <member><xref linkend="sql-alteropfamily"/></member>
123 </simplelist>
124 </refsect1>
125 </refentry>