Update cheatsheets

This commit is contained in:
ivuorinen
2025-09-21 00:20:59 +00:00
parent 81a6c63f96
commit 0c2e1663ab
6 changed files with 76 additions and 9 deletions

29
tldr/dropuser Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# dropuser
> Remove an existing PostgreSQL user (role).
> More information: <https://www.postgresql.org/docs/current/app-dropuser.html>.
- Prompt for confirmation and the username before user removal:
`dropuser {{[-i|--interactive]}}`
- Remove user instantly:
`dropuser {{username}}`
- No error if the user to be removed doesn't exist:
`dropuser --if-exists {{username}}`
- Remove a user on the server with address 127.0.0.1 on port 4321:
`dropuser {{[-h|--host]}} 127.0.0.1 {{[-p|--port]}} 4321 {{username}}`
- Remove a user on the server with address 127.0.0.1 on port 4321 as user "admin" :
`dropuser {{[-U|--username]}} admin {{[-h|--host]}} 127.0.0.1 {{[-p|--port]}} 4321 {{username}}`