PostgreSQL - List Users

[Pages:2]PostgreSQL ? List Users

To list users of PostgreSQL, open psql shell and run the list users command \du .

The command returns a table of rows with columns Role name, List of roles Attributes and Member of.

Role name

Role name is the user name with which the user logs in to the database.

List of roles Attributes

These are the roles corresponding to each user. In the above screenshot, postgres user has attributes: Superuser, Create role, Create DB, Replication, Bypass RLS. This means that postgres is the super user and the user can create roles, create databases, can setup replication and bypass RLS.

Member of

You can create groups where each group can contain multiple users. Each group can be assigned roles and here they become useful for the super user to control the attributes of users present in a group.

P o s t g re SQ L

PostgreSQL Tutorial PostgreSQL - Install PostgreSQL GUI PostgreSQL - psql Shell - Commands PostgreSQL - Create Database PostgreSQL - Select Database PostgreSQL - List Databases PostgreSQL - Drop Database PostgreSQL - Create Table PostgreSQL - Describe Table PostgreSQL - SHOW Tables PostgreSQL - Drop Table PostgreSQL - INSERT INTO Table PostgreSQL - SELECT FROM Table PostgreSQL - WHERE PostgreSQL - LIKE PostgreSQL - JOIN PostgreSQL - WITH PostgreSQL - UPDATE PostgreSQL - UPDATE FROM SELECT PostgreSQL - ADD COLUMN PostgreSQL - DELETE COLUMN PostgreSQL - PRIMARY KEY PostgreSQL - FOREIGN KEY PostgreSQL - SELECT INTO PostgreSQL - Current Date PostgreSQL - LIMIT PostgreSQL - HAVING PostgreSQL - DISTICNT

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download