ALTER_OPERATOR_CLASS(7pg15)
πΈ NAME πΈ
okay so this is the ALTER OPERATOR CLASS page, and itβs literally about changing the definition of an operator class. Thatβs the whole main-character job. π
β¨ SYNOPSIS β¨
bestie, hereβs the exact syntax vibe, no cap:
ALTER OPERATOR CLASS name USING index_method
RENAME TO new_name
ALTER OPERATOR CLASS name USING index_method
OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
ALTER OPERATOR CLASS name USING index_method
SET SCHEMA new_schema
π¦ DESCRIPTION π¦
ALTER OPERATOR CLASS changes the definition of an operator class. Simple as that, but make it iconic. β¨
ownership check, bestie: you must own the operator class to useALTER OPERATOR CLASS. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must haveCREATEprivilege on the operator classβs schema. Why? because these restrictions enforce that altering the owner doesnβt do anything you couldnβt do by dropping and recreating the operator class. However, a superuser can alter ownership of any operator class anyway. π
π PARAMETERS π
nameβ the name (optionally schema-qualified) of an existing operator class.index_methodβ the name of the index method this operator class is for.new_nameβ the new name of the operator class.new_ownerβ the new owner of the operator class.new_schemaβ the new schema for the operator class.
π COMPATIBILITY π
There is no ALTER OPERATOR CLASS statement in the SQL standard. Not a thing. Periodt. π
π SEE ALSO π
go peek at these icons too:
CREATE OPERATOR CLASS(CREATE_OPERATOR_CLASS(7))DROP OPERATOR CLASS(DROP_OPERATOR_CLASS(7))ALTER OPERATOR FAMILY(ALTER_OPERATOR_FAMILY(7))
mwah π β source/version: PostgreSQL 15.19, date: 2026. bye bestie! π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms