Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1puLu5-00068e-DX for pgsql-admin@arkaria.postgresql.org; Wed, 03 May 2023 23:28:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1puLu4-0007tN-54 for pgsql-admin@arkaria.postgresql.org; Wed, 03 May 2023 23:28:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1puLu3-0007pR-QV for pgsql-admin@lists.postgresql.org; Wed, 03 May 2023 23:28:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1puLu0-000O1B-Lg for pgsql-admin@lists.postgresql.org; Wed, 03 May 2023 23:28:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 343NSpcc3033057; Wed, 3 May 2023 19:28:51 -0400 From: Tom Lane To: M Sarwar cc: "pgsql-admin@lists.postgresql.org" Subject: Re: Just View create privilege to user user2 In-reply-to: References: Comments: In-reply-to M Sarwar message dated "Wed, 03 May 2023 23:07:43 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3033055.1683156531.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 03 May 2023 19:28:51 -0400 Message-ID: <3033056.1683156531@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk M Sarwar 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 =E2=80=82=E2=80=82CREATE V= IEW 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