public inbox for [email protected]
help / color / mirror / Atom feedIs the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match?
3+ messages / 2 participants
[nested] [flat]
* Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match?
@ 2026-03-23 05:00 Edwin UY <[email protected]>
2026-03-23 05:17 ` Re: Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match? David G. Johnston <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Edwin UY @ 2026-03-23 05:00 UTC (permalink / raw)
To: Pgsql-admin <[email protected]>
Hi,
Is the resultset from these queries has_table_privilege and
information_schema.role_table_grants supposed to match?
blahp1_abc_update is a role
User patrick has been granted the blahp1_abc_update role
Shouldn't blahp1_abc_update appear in the query from
information_schema.role_table_grant.
information_schema.role_table_grant.shows nothing for table_name =
'job_requests'
blahp1=>
blahp1=> select tablename, schemaname,
has_table_privilege('blahp1_abc_update', schemaname || '.' || tablename,
'SELECT') SELECT
from pg_tables
where tablename = 'job_requests' ;
tablename | schemaname | select
--------------+------------+--------
job_requests | blah | f
job_requests | blahp1_abc | t
(2 rows)
blahp1=> SELECT grantee, privilege_type, table_name
FROM information_schema.role_table_grants
WHERE table_schema = 'blahp1_abc'
;
grantee | privilege_type | table_name
---------+----------------+------------
(0 rows)
blahp1=>
blahp1=>
blahp1=> select table_name, table_schema from
information_schema.role_table_grants where table_name = 'job_requests' ;
table_name | table_schema
------------+--------------
(0 rows)
blahp1=>
blahp1=> select tablename, schemaname,
has_table_privilege('patrick', schemaname || '.' || tablename, 'SELECT')
SELECT
from pg_tables
where tablename = 'job_requests' ;
tablename | schemaname | select
--------------+------------+--------
job_requests | blah | f
job_requests | blahp1_abc | t
(2 rows)
Regards,
Pat
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match?
2026-03-23 05:00 Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match? Edwin UY <[email protected]>
@ 2026-03-23 05:17 ` David G. Johnston <[email protected]>
2026-03-23 05:27 ` Re: Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match? Edwin UY <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: David G. Johnston @ 2026-03-23 05:17 UTC (permalink / raw)
To: Edwin UY <[email protected]>; +Cc: Pgsql-admin <[email protected]>
On Sunday, March 22, 2026, Edwin UY <[email protected]> wrote:
>
> Is the resultset from these queries has_table_privilege and
> information_schema.role_table_grants supposed to match?
>
No.
The function performs inherits resolution and you specify an anchor role.
The view restricts itself to the logged in role and just reports actual
rows created in the database (i.e., the things granted and revoked).
David J.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match?
2026-03-23 05:00 Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match? Edwin UY <[email protected]>
2026-03-23 05:17 ` Re: Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match? David G. Johnston <[email protected]>
@ 2026-03-23 05:27 ` Edwin UY <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Edwin UY @ 2026-03-23 05:27 UTC (permalink / raw)
To: David G. Johnston <[email protected]>; +Cc: Pgsql-admin <[email protected]>
Thank you for the clarification.
I've logged in as the grantor now and am checking.
On Mon, Mar 23, 2026 at 6:17 PM David G. Johnston <
[email protected]> wrote:
> On Sunday, March 22, 2026, Edwin UY <[email protected]> wrote:
>>
>> Is the resultset from these queries has_table_privilege and
>> information_schema.role_table_grants supposed to match?
>>
>
> No.
>
> The function performs inherits resolution and you specify an anchor role.
> The view restricts itself to the logged in role and just reports actual
> rows created in the database (i.e., the things granted and revoked).
>
> David J.
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-03-23 05:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-23 05:00 Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match? Edwin UY <[email protected]>
2026-03-23 05:17 ` David G. Johnston <[email protected]>
2026-03-23 05:27 ` Edwin UY <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox