Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1WUG-00GfsS-Sh for pgsql-admin@arkaria.postgresql.org; Thu, 17 Oct 2024 19:48:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t1WUF-009AJk-4z for pgsql-admin@arkaria.postgresql.org; Thu, 17 Oct 2024 19:48:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1WUE-009AJa-QC for pgsql-admin@lists.postgresql.org; Thu, 17 Oct 2024 19:48:43 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1WUC-001aok-OZ for pgsql-admin@lists.postgresql.org; Thu, 17 Oct 2024 19:48:42 +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 49HJmdAe704896; Thu, 17 Oct 2024 15:48:39 -0400 From: Tom Lane To: "Wong, Kam Fook (TR Technology)" cc: Pgsql-admin Subject: Re: 101 Grants and Access Right Table/View In-reply-to: References: Comments: In-reply-to "Wong, Kam Fook (TR Technology)" message dated "Thu, 17 Oct 2024 18:38:07 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <704894.1729194519.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 17 Oct 2024 15:48:39 -0400 Message-ID: <704895.1729194519@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Wong, Kam Fook (TR Technology)" writes: > I have a simple question for "access rights" view or table within Postgr= es. > Here is my grant query: > GRANT USAGE ON SCHEMA abc TO abc_user; > GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA abc TO abc_= user; > GRANT ALL ON ALL SEQUENCES IN SCHEMA abc TO abc_user; > GRANT EXECUTE ON ALL ROUTINES IN SCHEMA abc TO abc_user; > But I can't find a view/table that is associated with the above > grants? Those commands would simply apply the grants to any existing objects in the given schema, so you'd have to look at such objects to see the effects. If there are none, nothing happens. You might be looking for ALTER DEFAULT PRIVILEGES? regards, tom lane