How to create PostgreSQL User with superuser privileges

In this article, we will see how to create PostgreSQL User with superuser privileges by two ways.

Create PostgreSQL User/Role with superuser privileges by using either of following methods:
1. Create User/Role first then assign superuser privilege.
2. Create User/Role with superuser privileges.

Continue reading How to create PostgreSQL User with superuser privileges

How to grant select to all tables in PostgreSQL

In this article, we will see how to grant select to all tables in PostgreSQL. We can grant select privilege in PostgreSQL by using grant command.

Syntax to grant select to all tables in PostgreSQL:
Continue reading How to grant select to all tables in PostgreSQL

How to grant permissions on all tables to a user in PostgreSQL

In this article, we will see how to grant permissions on all tables to a user in PostgreSQL.

Syntax:

GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO user_name;

Examples:

1. First grant CONNECT to database using below syntax.
Continue reading How to grant permissions on all tables to a user in PostgreSQL