DROP_SEQUENCE(7pg14)
okay bestie, this is the DROP_SEQUENCE(7pg14) page β manual name folded in near the top, just like we like it β and weβre talking about removing sequences in the PostgreSQL 14.24 docs. Buckle up, itβs giving concise but iconic π
πΈ NAME πΈ
DROP_SEQUENCE β remove a sequence π
β¨ SYNOPSIS β¨
DROP SEQUENCE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
π¦ DESCRIPTION π¦
okay so DROP SEQUENCE removes sequence number generators. The vibe check is simple: a sequence can only be dropped by its owner or a superuser. no cap, thatβs the rule π
π PARAMETERS π
IF EXISTSβ do not throw an error if the sequence does not exist. A notice is issued in this case πnameβ the name (optionally schema-qualified) of a sequence β¨CASCADEβ automatically drop objects that depend on the sequence, and in turn all objects that depend on those objects (see Section 5.14) πRESTRICTβ refuse to drop the sequence if any objects depend on it. This is the default π
π EXAMPLES π
To remove the sequence serial:
DROP SEQUENCE serial;
π COMPATIBILITY π
DROP SEQUENCE conforms to the SQL standard, except that the standard only allows one sequence to be dropped per command, and apart from the IF EXISTS option, which is a PostgreSQL extension. periodt π«
π SEE ALSO π
CREATE SEQUENCE(CREATE_SEQUENCE(7)) β go make a sequence, bestie π«ΆALTER SEQUENCE(ALTER_SEQUENCE(7)) β go change one up π
π cute sign-off time: source/version is PostgreSQL 14.24, dated 2026 β bye bestie, go slay your sequences π β¨
π¦ 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