User CreationSYNTAX: CREATING A USER: “createuser name”TO FIND LIST OF USERS : “SELECT usename FROM pg_user;” postgres=# select usename from pg_user; usename ---------- postgres (1 row) postgres=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------+----------- postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}CREATING A USER FROM DATABASE LEVEL : postgres=# create user tesdb; CREATE ROLE postgres=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------+----------- postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {} tesdb | | {} -bash-4.2$ psql -U tesdb psql (13.13) Type "help" for help. postgres=> \conninfo You are connected to database "postgres" as user "tesdb" via socket in "/var/run/postgresql" at port "5432". Next Topic » (Setting default schema) |