Re: Just View create privilege to user user2 - Mailing list pgsql-admin

From M Sarwar
Subject Re: Just View create privilege to user user2
Date
Msg-id DM4PR19MB59786BCC6BECD049C12E6AFCD36C9@DM4PR19MB5978.namprd19.prod.outlook.com
Whole thread Raw
In response to Re: Just View create privilege to user user2  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@sss.pgh.pa.us>
Sent: Wednesday, May 3, 2023 7:28 PM
To: M Sarwar <sarwarmd02@outlook.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Just View create privilege to user user2
 
M Sarwar <sarwarmd02@outlook.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

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Just View create privilege to user user2
Next
From: Holger Jakobs
Date:
Subject: Re: iso-8859-1 postgres ssl error "could not accept SSL connection: Success" and timeout