pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Tu <kevintu888@gmail.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Query a role's permission on a function
Date: Mon, 06 Dec 2021 16:30:27 -0500
Message-ID: <3362016.1638826227@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKbWnAV-12DCrDRw0DDWTDjs66J29PoGbLiBYWszjP3Bbgg4pw@mail.gmail.com>
References: <CAKbWnAV-12DCrDRw0DDWTDjs66J29PoGbLiBYWszjP3Bbgg4pw@mail.gmail.com>

Kevin Tu <kevintu888@gmail.com> 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





view thread (3+ messages)

Message-ID: <3362016.1638826227@sss.pgh.pa.us>
Permalink:  ../3362016.1638826227@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3362016.1638826227@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, kevintu888@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Query a role's permission on a function
  In-Reply-To: <3362016.1638826227@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