DROP_VIEW(7pg16)

πŸ“¦ version 16.15, in opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so this is the DROP VIEW(7) page, and the command on the menu is DROP_VIEW β€” remove a view. Welcome bestie, we’re gonna get you comfy with it. ✨


✨ SYNOPSIS ✨

The whole shape of the command is:

DROP VIEW [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]

πŸ¦‹ DESCRIPTION πŸ¦‹

DROP VIEW drops an existing view. That’s literally the main-character job. To execute this command you must be the owner of the view. No cap. πŸ’…


🌸 PARAMETERS 🌸

  • IF EXISTS β€” do not throw an error if the view does not exist. In this case, a notice is issued.
  • name β€” the name (optionally schema-qualified) of the view to remove.
  • 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).
  • RESTRICT β€” refuse to drop the view if any objects depend on it. This is the default.

πŸŽ€ EXAMPLES πŸŽ€

This command will remove the view called kinds:

DROP VIEW kinds;

🌈 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. Slay, but make it standards-compliant-ish. 🫢


πŸ’œ SEE ALSO πŸ’œ


okay that’s the whole page, bestie. This iconic manual page is from PostgreSQL 16.15, dated 2026, and it’s the DROP VIEW(7) page β€” periodt. πŸ«ΆπŸ’–

πŸ“¦ where this page comes from