There is nice cheat sheet
• written by Pavel Stěhule in Czech language – tahák.
• psql can produce nice tables
postgres=# select * from pg_user;
╔═════════════════╤══════════╤═════════════╤══════════╤═════════╤══════════════╤══════════╤══════════╤═══════════╗
║ usename │ usesysid │ usecreatedb │ usesuper │ userepl │ usebypassrls │ passwd │ valuntil │ useconfig ║
╠═════════════════╪══════════╪═════════════╪══════════╪═════════╪══════════════╪══════════╪══════════╪═══════════╣
║ postgres │ 10 │ t │ t │ t │ t │ ******** │ «¤» │ «¤» ║
║ weather_reports │ 16390 │ f │ f │ f │ f │ ******** │ «¤» │ «¤» ║
║ weather_online │ 16389 │ f │ f │ f │ f │ ******** │ «¤» │ «¤» ║
║ joethedba │ 16438 │ f │ f │ f │ f │ ******** │ «¤» │ «¤» ║
║ sample_user │ 16442 │ f │ f │ f │ f │ ******** │ «¤» │ «¤» ║
╚═════════════════╧══════════╧═════════════╧══════════╧═════════╧══════════════╧══════════╧══════════╧═══════════╝
(5 rows)
[local]:5432 postgres@postgres(10.1)=(1)# select session_user, current_user;
┌──────────────┬──────────────┐
│ session_user │ current_user │
├──────────────┼──────────────┤
│ postgres │ postgres │
└──────────────┴──────────────┘
(1 row)
• psql can use a pspg pager for interactive browsing through result set, by Pavel
Stěhule ☺ Already in PGDG repositories, ready to install.
73PostgreSQL administration beginners' workshopFebruary 2, 2020