2 .\" Title: ALTER OPERATOR CLASS
3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
10 .TH "ALTER OPERATOR CLASS" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 ALTER_OPERATOR_CLASS \- change the definition of an operator class
35 ALTER OPERATOR CLASS \fIname\fR USING \fIindex_method\fR
36 RENAME TO \fInew_name\fR
38 ALTER OPERATOR CLASS \fIname\fR USING \fIindex_method\fR
39 OWNER TO { \fInew_owner\fR | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
41 ALTER OPERATOR CLASS \fIname\fR USING \fIindex_method\fR
42 SET SCHEMA \fInew_schema\fR
46 \fBALTER OPERATOR CLASS\fR
47 changes the definition of an operator class\&.
49 You must own the operator class to use
50 \fBALTER OPERATOR CLASS\fR\&. To alter the owner, you must be able to
52 to the new owning role, and that role must have
54 privilege on the operator class\*(Aqs schema\&. (These restrictions enforce that altering the owner doesn\*(Aqt do anything you couldn\*(Aqt do by dropping and recreating the operator class\&. However, a superuser can alter ownership of any operator class anyway\&.)
59 The name (optionally schema\-qualified) of an existing operator class\&.
64 The name of the index method this operator class is for\&.
69 The new name of the operator class\&.
74 The new owner of the operator class\&.
79 The new schema for the operator class\&.
84 \fBALTER OPERATOR CLASS\fR
85 statement in the SQL standard\&.
87 CREATE OPERATOR CLASS (\fBCREATE_OPERATOR_CLASS\fR(7)), DROP OPERATOR CLASS (\fBDROP_OPERATOR_CLASS\fR(7)), ALTER OPERATOR FAMILY (\fBALTER_OPERATOR_FAMILY\fR(7))