Re: Just View create privilege to user user2

From: M Sarwar <sarwarmd02(at)outlook(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:38:51
Message-ID: DM4PR19MB59786BCC6BECD049C12E6AFCD36C9@DM4PR19MB5978.namprd19.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Tom,
It is not just my idea. We have 1 such requirement now.
I am ready to think if that is going to help.
We need to provide limited access to a team which is outside of our core project team.
Can you point me to a sample trigger like which you mentioned?

Thanks,
Sarwar

________________________________
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Wednesday, May 3, 2023 7:28 PM
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

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

Browse pgsql-admin by date

  From Date Subject
Next Message Holger Jakobs 2023-05-04 08:16:28 Re: unknown postgres ssl error "could not accept SSL connection: Success" and timeout
Previous Message Tom Lane 2023-05-03 23:28:51 Re: Just View create privilege to user user2