postgres=> \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+---------------------
abc | Cannot login | {}
d | Cannot login | {}
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
ro | | {pg_read_all_data}
rw | | {pg_write_all_data}
postgres=> \db
List of tablespaces
Name | Owner | Location
------------+----------+----------
pg_default | postgres |
pg_global | postgres |
(2 rows)
postgres=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+---------+-------+-----------------------
postgres | postgres | UTF8 | C | en_US |
template0 | postgres | UTF8 | C | en_US | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | C | en_US | =c/postgres +
| | | | | postgres=CTc/postgres
(3 rows)
postgres=> \dp+
Access privileges
Schema | Name | Type | Access privileges | Column privileges | Policies
--------+----------------+-------+---------------------------+-------------------+----------
public | a | table | | |
public | b | table | | |
public | c | table | | |
public | comments | table | | |
public | pg_buffercache | view | postgres=arwdDxt/postgres+| |
| | | pg_monitor=r/postgres | |
public | posts | table | | |
public | t | table | | |
(7 rows)
postgres=> \dx
List of installed extensions
Name | Version | Schema | Description
----------------+---------+------------+---------------------------------
pg_buffercache | 1.3 | public | examine the shared buffer cache
pgcrypto | 1.3 | public | cryptographic functions
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
roaringbitmap | 0.5 | public | support for Roaring Bitmaps
(4 rows)