pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedQuery a role's permission on a function
3+ messages / 3 participants
[nested] [flat]
* Query a role's permission on a function
@ 2021-12-06 20:34 Kevin Tu <kevintu888@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Kevin Tu @ 2021-12-06 20:34 UTC (permalink / raw)
To: pgsql-admin <pgsql-admin@lists.postgresql.org>
Hi team,
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?
Thanks in advance,
Kevin Tu
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Query a role's permission on a function
@ 2021-12-06 21:29 Chandra Juthuga <shekharjchandra@hotmail.co.uk>
parent: Kevin Tu <kevintu888@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Chandra Juthuga @ 2021-12-06 21:29 UTC (permalink / raw)
To: Kevin Tu <kevintu888@gmail.com>; pgsql-admin <pgsql-admin@lists.postgresql.org>
Try this :-
SELECT proacl
FROM pg_proc
WHERE proname='<Name of function>';
Regards
Chandra
________________________________
From: Kevin Tu <kevintu888@gmail.com>
Sent: 06 December 2021 20:34
To: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Query a role's permission on a function
Hi team,
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?
Thanks in advance,
Kevin Tu
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Query a role's permission on a function
@ 2021-12-06 21:30 Tom Lane <tgl@sss.pgh.pa.us>
parent: Kevin Tu <kevintu888@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2021-12-06 21:30 UTC (permalink / raw)
To: Kevin Tu <kevintu888@gmail.com>; +Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-12-06 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 20:34 Query a role's permission on a function Kevin Tu <kevintu888@gmail.com>
2021-12-06 21:29 ` Chandra Juthuga <shekharjchandra@hotmail.co.uk>
2021-12-06 21:30 ` Tom Lane <tgl@sss.pgh.pa.us>
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