2 doc/src/sgml/ref/alter_opclass.sgml
3 PostgreSQL documentation
6 <refentry id="SQL-ALTEROPCLASS">
8 <refentrytitle>ALTER OPERATOR CLASS</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
14 <refname>ALTER OPERATOR CLASS</refname>
15 <refpurpose>change the definition of an operator class</refpurpose>
18 <indexterm zone="sql-alteropclass">
19 <primary>ALTER OPERATOR CLASS</primary>
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>
31 <title>Description</title>
34 <command>ALTER OPERATOR CLASS</command> changes the definition of
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
50 <title>Parameters</title>
54 <term><replaceable class="parameter">name</replaceable></term>
57 The name (optionally schema-qualified) of an existing operator
64 <term><replaceable class="parameter">index_method</replaceable></term>
67 The name of the index method this operator class is for.
73 <term><replaceable class="parameter">new_name</replaceable></term>
76 The new name of the operator class.
82 <term><replaceable class="parameter">new_owner</replaceable></term>
85 The new owner of the operator class.
91 <term><replaceable class="parameter">new_schema</replaceable></term>
94 The new schema for the operator class.
102 <title>Compatibility</title>
105 There is no <command>ALTER OPERATOR CLASS</command> statement in
111 <title>See Also</title>
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>