DROP_VIEW(7pg15)
π NAME π
Okay so this is the DROP VIEW(7) page from the PostgreSQL 15.19 Documentation, and it's literally about one thing: removing a view. No cap. β¨
DROP VIEW drops an existing view. To run this command, you must be the owner of the view β owner energy only, bestie. π
β¨ SYNOPSIS β¨
DROP VIEW [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
π DESCRIPTION π
DROP VIEW drops an existing view. To execute this command you must be the owner of the view. That's the whole vibe check: existing view, you own it, it goes poof. π«Ά
π¦ PARAMETERS π¦
IF EXISTSβ do not throw an error if the view does not exist. In that case, a notice is issued. Very "no drama, just a little heads-up" energy. πnameβ the name of the view to remove, optionally schema-qualified. Like,schema.viewis valid, iykyk. πCASCADEβ automatically drop objects that depend on the view (such as other views), and in turn all objects that depend on those objects (see Section 5.14). It's giving chain reaction, but make it SQL. πRESTRICTβ refuse to drop the view if any objects depend on it. This is the default. So if you don't say anything, it's lowkey protective. π₯
πΈ EXAMPLES πΈ
This command will remove the view called kinds:
DROP VIEW kinds;
Slay. That view is gone. π¦
π COMPATIBILITY π
This command conforms to the SQL standard, except that the standard only allows one view to be dropped per command, and apart from the IF EXISTS option, which is a PostgreSQL extension. So yeah β mostly standard, with a little PostgreSQL main character energy. π
π SEE ALSO π
ALTER VIEW (ALTER_VIEW(7))CREATE VIEW (CREATE_VIEW(7))
And that's the whole manual page, bestie: DROP VIEW(7) brought to you by PostgreSQL 15.19, dated 2026. Periodt. ππ
π¦ 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