Created
December 15, 2020 17:40
-
-
Save alanwsmith/7d344c2b60e79bac39b122ccb186b508 to your computer and use it in GitHub Desktop.
Example of viewing permissions in postgres with `\du` vs `\l`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres-# \du | |
List of roles | |
Role name | Attributes | Member of | |
---------------------+------------------------------------------------------------+----------- | |
launchpad_dev_user | | {} | |
launchpad_prod_user | | {} | |
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {} | |
toolkit_dev_user | | {} | |
toolkit_prod | | {} | |
toolkit_prod_user | | {} | |
postgres-# \l | |
List of databases | |
Name | Owner | Encoding | Collate | Ctype | Access privileges | |
-------------------+----------+----------+---------+-------+---------------------------------- | |
launchpad_dev_db | postgres | UTF8 | C | C | =Tc/postgres + | |
| | | | | postgres=CTc/postgres + | |
| | | | | launchpad_dev_user=CTc/postgres | |
launchpad_prod_db | postgres | UTF8 | C | C | =Tc/postgres + | |
| | | | | postgres=CTc/postgres + | |
| | | | | launchpad_prod_user=CTc/postgres | |
postgres | postgres | UTF8 | C | C | | |
template0 | postgres | UTF8 | C | C | =c/postgres + | |
| | | | | postgres=CTc/postgres | |
template1 | postgres | UTF8 | C | C | =c/postgres + | |
| | | | | postgres=CTc/postgres | |
toolkit_dev_db | postgres | UTF8 | C | C | =Tc/postgres + | |
| | | | | postgres=CTc/postgres + | |
| | | | | toolkit_dev_user=CTc/postgres | |
toolkit_prod_db | postgres | UTF8 | C | C | =Tc/postgres + | |
| | | | | postgres=CTc/postgres + | |
| | | | | toolkit_prod_user=CTc/postgres | |
(7 rows) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment