access and simple query for postgresql

etc/PostgreSQL

- client access

psql -h <postgresql-end-point> -U <user> -d <database> -W

- database list

SELECT datname FROM pg_database WHERE datistemplate = false;

- process list

select * from pg_stat_activity;