mirror of
https://github.com/jbranchaud/til
synced 2026-01-05 08:08:02 +00:00
Add List Database Users as a postgres til.
This commit is contained in:
@@ -81,6 +81,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
||||
- [Limit Execution Time Of Statements](postgres/limit-execution-time-of-statements.md)
|
||||
- [List All Columns Of A Specific Type](postgres/list-all-columns-of-a-specific-type.md)
|
||||
- [List All Versions Of A Function](postgres/list-all-versions-of-a-function.md)
|
||||
- [List Database Users](postgres/list-database-users.md)
|
||||
- [Send A Command To psql](postgres/send-a-command-to-psql.md)
|
||||
- [Special Math Operators](postgres/special-math-operators.md)
|
||||
- [String Contains Another String](postgres/string-contains-another-string.md)
|
||||
|
||||
13
postgres/list-database-users.md
Normal file
13
postgres/list-database-users.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# List Database Users
|
||||
|
||||
Within `psql`, type `\du` to list all the users for a database and their
|
||||
respective permissions.
|
||||
|
||||
```bash
|
||||
> \du
|
||||
List of roles
|
||||
Role name | Attributes | Member of
|
||||
------------+------------------------------------------------+-----------
|
||||
jbranchaud | Superuser, Create role, Create DB, Replication | {}
|
||||
sampleuser | Create DB | {}
|
||||
```
|
||||
Reference in New Issue
Block a user