Wednesday, November 19, 2025

Tip of the Day - Oracle & PostgreSQL (Fri, 20 Feb 2026)

PostgreSQL DB - Role Vs. User


For  PostgreSQL Database, Role and User are the same thing. Except, User is a role with LOGIN privilege.

Any of the following two commands can be used to create a user in PostgreSQL:

CREATE ROLE user1 LOGIN PASSWORD 'P@ssw0rd1';
or
CREATE USER user1 PASSWORD 'P@ssw0rd1';

CREATE USER command is same as CREATE ROLE command, but CREATE USER command includes the LOGIN attribute by default.