mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 18:55:24 +02:00
dropdb: add page (#16862)
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Co-authored-by: Wiktor Perskawiec <wiktor@perskawiec.cc>
This commit is contained in:
parent
edbed8ce00
commit
0433d86f22
1 changed files with 37 additions and 0 deletions
37
pages/common/dropdb.md
Normal file
37
pages/common/dropdb.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# dropdb
|
||||
|
||||
> Remove a PostgreSQL database.
|
||||
> A simple wrapper around the SQL command `DROP DATABASE`.
|
||||
> More information: <https://www.postgresql.org/docs/current/app-dropdb.html>.
|
||||
|
||||
- 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}}`
|
Loading…
Add table
Reference in a new issue