]> begriffs open source - ai-pg/blob - full-docs/man7/ALTER_OPERATOR_CLASS.7
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man7 / ALTER_OPERATOR_CLASS.7
1 '\" t
2 .\"     Title: ALTER OPERATOR CLASS
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 ALTER_OPERATOR_CLASS \- change the definition of an operator class
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 ALTER OPERATOR CLASS \fIname\fR USING \fIindex_method\fR
36     RENAME TO \fInew_name\fR
37
38 ALTER OPERATOR CLASS \fIname\fR USING \fIindex_method\fR
39     OWNER TO { \fInew_owner\fR | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
40
41 ALTER OPERATOR CLASS \fIname\fR USING \fIindex_method\fR
42     SET SCHEMA \fInew_schema\fR
43 .fi
44 .SH "DESCRIPTION"
45 .PP
46 \fBALTER OPERATOR CLASS\fR
47 changes the definition of an operator class\&.
48 .PP
49 You must own the operator class to use
50 \fBALTER OPERATOR CLASS\fR\&. To alter the owner, you must be able to
51 SET ROLE
52 to the new owning role, and that role must have
53 CREATE
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\&.)
55 .SH "PARAMETERS"
56 .PP
57 \fIname\fR
58 .RS 4
59 The name (optionally schema\-qualified) of an existing operator class\&.
60 .RE
61 .PP
62 \fIindex_method\fR
63 .RS 4
64 The name of the index method this operator class is for\&.
65 .RE
66 .PP
67 \fInew_name\fR
68 .RS 4
69 The new name of the operator class\&.
70 .RE
71 .PP
72 \fInew_owner\fR
73 .RS 4
74 The new owner of the operator class\&.
75 .RE
76 .PP
77 \fInew_schema\fR
78 .RS 4
79 The new schema for the operator class\&.
80 .RE
81 .SH "COMPATIBILITY"
82 .PP
83 There is no
84 \fBALTER OPERATOR CLASS\fR
85 statement in the SQL standard\&.
86 .SH "SEE ALSO"
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))