Wednesday , April 2 2025

PostgreSQL User Inherity

In today’s article, we will learn how to create a role with SELECT permission and add a newly created user to this role.

For example, a user named Faruk was created below and a role with only select permission was created in the public schema.

Authorization has been given to Faruk user for the select permission role.

Let’s perform a select on the relevant database.

Let’s check whether the user Faruk can perform an INSERT operation.

As seen above, an access denied error is returned.

This indicates that the operation we performed is correct.

Loading

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *