show users;
show users
postgres=# \du List of roles Role name | Attributes | Member of ----------------+------------------------------------------------------------+----------- YOUR_USER | Create DB | {} postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
select * from pg_user;
create role USERNAME with login password 'PASSWORD';
create database DATABASE_NAME owner USERNAME;
Related terms[edit]
See also[edit]
- PostgreSQL:
psql
,.psqlrc, .pgpass
,$HOME/.pg service.conf
,-U, -W, -d
, meta-commands:\du, \dg, \ddp, \dp, \list, \dn, \dt, \c, \l, \di, \q
,show users
,show
,su - postgres
,psql -c, \?, \connect, \conninfo
,--version, --help
, PL/pgSQL - PostgreSQL users, predefined roles:
pg_read_all_data, pg_monitor
,create role
,.pgpass
, PostgreSQL read only user
Advertising: