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 1pQRDB-000658-7C for pgsql-admin@arkaria.postgresql.org; Fri, 10 Feb 2023 11:05:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pQRD9-0000zS-JG for pgsql-admin@arkaria.postgresql.org; Fri, 10 Feb 2023 11:04:59 +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 1pQRD9-0000zC-7u for pgsql-admin@lists.postgresql.org; Fri, 10 Feb 2023 11:04:59 +0000 Received: from mout-u-204.mailbox.org ([80.241.59.204]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQRD5-0005ax-Vs for pgsql-admin@lists.postgresql.org; Fri, 10 Feb 2023 11:04:58 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4PCrVC47q2z9sSP; Fri, 10 Feb 2023 12:04:51 +0100 (CET) Date: Fri, 10 Feb 2023 12:04:49 +0100 (CET) From: Erik Wienhold To: Manmeet Singh , pgsql-admin@lists.postgresql.org Message-ID: <880018050.326226.1676027089991@office.mailbox.org> In-Reply-To: References: Subject: Re: Role Permission issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 10/02/2023 09:14 CET Manmeet Singh wrote: > > We have created one role and assign the permission to that role for example: > Select on all tables. > > Now i want to find out, what permissions we do have in this role.. The ACL is spread over multiple tables, depending on the object type: https://www.postgresql.org/docs/15/ddl-priv.html#PRIVILEGES-SUMMARY-TABLE You can search for specific roles using aclexplode and filtering on grantee: select relnamespace::regnamespace, relname, acl.* from pg_class, aclexplode(relacl) acl where acl.grantee = 'alice'::regrole But you have to query each object type (pg_class, pg_proc, etc.) separately. -- Erik