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