DROP_TYPE(7pg17)
β¨ NAME β¨
okay so welcome to the DROP_TYPE(7pg17) page, bestie β this is from the PostgreSQL 17.11 docs, and it's literally the manual for DROP TYPE, aka removing a data type. π
DROP TYPE removes a user-defined data type. Only the owner of a type can remove it. periodt. π
πΈ SYNOPSIS πΈ
DROP TYPE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
π¦ DESCRIPTION π¦
So DROP TYPE removes a user-defined data type. Only the owner of a type can remove it β like, you can't just yeet someone else's type, bestie. π
π PARAMETERS π
IF EXISTSβ do not throw an error if the type does not exist. A notice is issued in this case. π«Άnameβ the name (optionally schema-qualified) of the data type to remove. β¨CASCADEβ automatically drop objects that depend on the type (such as table columns, functions, and operators), and in turn all objects that depend on those objects (see Section 5.15). πRESTRICTβ refuse to drop the type if any objects depend on it. This is the default. π«
π EXAMPLES π
To remove the data type box:
DROP TYPE box;
π COMPATIBILITY π
This command is similar to the corresponding command in the SQL standard, apart from the IF EXISTS option, which is a PostgreSQL extension. But note that much of the CREATE TYPE command and the data type extension mechanisms in PostgreSQL differ from the SQL standard. no cap. π
π SEE ALSO π
ALTER TYPE(ALTER_TYPE(7))CREATE TYPE(CREATE_TYPE(7))
xoxo, your Unix bestie π β PostgreSQL 17.11, 2026. π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-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