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 1muLZB-0004rx-WF for pgsql-admin@arkaria.postgresql.org; Mon, 06 Dec 2021 21:30:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1muLZA-0004U2-PO for pgsql-admin@arkaria.postgresql.org; Mon, 06 Dec 2021 21:30:32 +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 1muLZA-0004Ts-As for pgsql-admin@lists.postgresql.org; Mon, 06 Dec 2021 21:30:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muLZ7-0002VQ-Q5 for pgsql-admin@lists.postgresql.org; Mon, 06 Dec 2021 21:30:31 +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 1B6LURxY3362017; Mon, 6 Dec 2021 16:30:27 -0500 From: Tom Lane To: Kevin Tu cc: pgsql-admin Subject: Re: Query a role's permission on a function In-reply-to: References: Comments: In-reply-to Kevin Tu message dated "Mon, 06 Dec 2021 15:34:42 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3362015.1638826227.1@sss.pgh.pa.us> Date: Mon, 06 Dec 2021 16:30:27 -0500 Message-ID: <3362016.1638826227@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kevin Tu writes: > This sounds easy enough, but I can't quite figure out searching around. Can > anybody please tell me which catalog table to query to find out whether a > role/user has execute permission on a function? I'd suggest using has_function_privilege() instead of trying to duplicate the logic for yourself. https://www.postgresql.org/docs/current/functions-info.html regards, tom lane