Re: Just View create privilege to user user2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: M Sarwar <sarwarmd02(at)outlook(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Just View create privilege to user user2
Date: 2023-05-03 23:28:51
Message-ID: 3033056.1683156531@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

M Sarwar <sarwarmd02(at)outlook(dot)com> writes:
> I want user u2 to have only CREATE VIEW privilege in schema s2. I do not want u2 to create any other type of objects in s2 schema.
> I am unable to find the command to grant just   CREATE VIEW privilege to be granted to u2.

There is no such privilege, and we're quite unlikely to invent one,
because it would be outside the SQL standard's privilege model.

You could probably enforce a requirement like this with a custom
event trigger. But I'd encourage you to rethink why you think this
is a good idea.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message M Sarwar 2023-05-03 23:38:51 Re: Just View create privilege to user user2
Previous Message M Sarwar 2023-05-03 23:07:43 Just View create privilege to user user2