Revoke Permission in PostgreSQL

Revoke Permission in PostgreSQL

This article contains information about revoke command usage in PostgreSQL. You may want to revoke permissions of users. In this case, you can use the plpgsql commands below. First, let’s see the sytanx and then the examples.

In the example below, we use the following commands to revoke f_user’s all the permissions in table sequences and functions.

We can use the command below to revoke create permission on the schema.

With the help of the command below, we will revoke the select, insert, update, delete permission on the products table from f_user.

Revoke Select Permission from user:

Revoke Insert Permission from user:

Revoke Update Permission from user:

Revoke Delete Permission from user:

To revoke the permissions such as select and insert in the same script, you can edit and run the command by seperating permissions with a comma as follows.

Leave a Reply