PostgreSQL – USERS

Database Users are accounts that can be used to log into the database system and perform various actions, such as querying the database, creating tables, and executing administrative tasks. PostgreSQL supports both regular users and superusers (also known as administrators). Creating a User: To create a user, you can use the CREATE USER command: CREATE…

PostgreSQL – REVOKE Statement

The REVOKE statement is used to remove previously granted privileges from users or roles on database objects. The REVOKE statement allows you to control access and privileges by revoking certain permissions that were previously granted. Here is the basic syntax of the REVOKE statement: REVOKE privilege_name [, …] ON object_name FROM user_or_role [, …] [CASCADE…

PostgreSQL – Privileges

Privileges control the actions that users and roles are allowed to perform on database objects such as tables, views, functions, and schemas. Privileges determine who can read, write, modify, or delete data within the database. PostgreSQL provides a fine-grained privilege system that allows you to control access at different levels of granularity. Here are some…

PostgreSQL – Roles

Roles are used to manage authentication and authorization. Roles can represent users or groups of users, and they control who can access the database and what actions they are allowed to perform. PostgreSQL provides two main types of roles: user roles and group roles (also known as role hierarchies). User Roles: User roles represent individual…