From 0433d86f22b6c216b9e5a674ab14dd1247cb164f Mon Sep 17 00:00:00 2001 From: Kristopher Date: Wed, 18 Jun 2025 10:59:01 -0700 Subject: [PATCH] dropdb: add page (#16862) Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Co-authored-by: Wiktor Perskawiec --- pages/common/dropdb.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pages/common/dropdb.md diff --git a/pages/common/dropdb.md b/pages/common/dropdb.md new file mode 100644 index 0000000000..033c107670 --- /dev/null +++ b/pages/common/dropdb.md @@ -0,0 +1,37 @@ +# dropdb + +> Remove a PostgreSQL database. +> A simple wrapper around the SQL command `DROP DATABASE`. +> More information: . + +- Destroy a database: + +`dropdb {{dbname}}` + +- Request a verification prompt before any destructive actions: + +`dropdb {{[-i|--interactive]}} {{database_name}}` + +- Connect with a specific username and destroy a database: + +`dropdb {{[-U|--username]}} {{username}} {{dbname}}` + +- Force a password prompt before connecting to the database: + +`dropdb {{[-W|--password]}} {{dbname}}}}` + +- Suppress a password prompt before connecting to the database: + +`dropdb {{[-w|--no-password]}} {{database_name}}` + +- Specify the server host name: + +`dropdb {{[-h|--host]}} {{host}} {{database_name}}` + +- Specify the server port: + +`dropdb {{[-p|--port]}} {{port}} {{database_name}}` + +- Attempt to terminate existing connections before destroying the database: + +`dropdb {{[-f|--force]}} {{database_name}}`