pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
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
Date: Wed, 03 May 2023 19:28:51 -0400
Message-ID: <3033056.1683156531@sss.pgh.pa.us> (raw)
In-Reply-To: <DM4PR19MB5978ABDF877412086889CC50D36C9@DM4PR19MB5978.namprd19.prod.outlook.com>
References: <DM4PR19MB5978ABDF877412086889CC50D36C9@DM4PR19MB5978.namprd19.prod.outlook.com>

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





view thread (5+ messages)  latest in thread

Message-ID: <3033056.1683156531@sss.pgh.pa.us>
Permalink:  ../3033056.1683156531@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3033056.1683156531@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sarwarmd02@outlook.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Just View create privilege to user user2
  In-Reply-To: <3033056.1683156531@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox