DROP_OPERATOR(7pg14)
β¨ DROP_OPERATOR β¨
okay bestie, welcome to the DROP_OPERATOR(7) page from the PostgreSQL 14.24 docs β this is the whole "bye bye operator" situation, and it's lowkey iconic π
πΈ NAME πΈ
DROP_OPERATOR β remove an operator, periodt. That's literally the whole vibe π«Ά
π¦ SYNOPSIS π¦
DROP OPERATOR [ IF EXISTS ] name ( { left_type | NONE } , right_type ) [, ...] [ CASCADE | RESTRICT ]
π DESCRIPTION π
okay so DROP OPERATOR drops an existing operator from the database system. To execute this command you must be the owner of the operator β no cap, owner energy only π
π PARAMETERS π
IF EXISTSβ do not throw an error if the operator does not exist. A notice is issued in this case, so it's giving "gentle heads up" not "full meltdown" πnameβ the name (optionally schema-qualified) of an existing operator. yes bestie, schema-qualified is allowed πleft_typeβ the data type of the operator's left operand; writeNONEif the operator has no left operand π«Άright_typeβ the data type of the operator's right operand β¨CASCADEβ automatically drop objects that depend on the operator (such as views using it), and in turn all objects that depend on those objects (see Section 5.14). it's giving domino effect, fr fr πRESTRICTβ refuse to drop the operator if any objects depend on it. this is the default, so it's the main character setting π
π EXAMPLES π
Remove the power operator a^b for type integer:
DROP OPERATOR ^ (integer, integer);
Remove the bitwise-complement prefix operator ~b for type bit:
DROP OPERATOR ~ (none, bit);
Remove multiple operators in one command:
DROP OPERATOR ~ (none, bit), ^ (integer, integer);
β COMPATIBILITY β
There is no DROP OPERATOR statement in the SQL standard. not me checking the standard and finding nothing π it's just not there, bestie.
π SEE ALSO π
CREATE OPERATOR (CREATE_OPERATOR(7))ALTER OPERATOR (ALTER_OPERATOR(7))
k bye bestie π«Ά this page is from PostgreSQL 14.24, dated 2026, and it's the DROP OPERATOR(7) page. slay β¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-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