Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match? - Mailing list pgsql-admin

From Edwin UY
Subject Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match?
Date
Msg-id CA+wokJ-OQ9s=gpEpUgxXXa0creC-izJb7Giztc-_0N=9SW40xg@mail.gmail.com
Whole thread
Responses Re: Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match?
List pgsql-admin
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


pgsql-admin by date:

Previous
From: Ron Johnson
Date:
Subject: Re: OS upgrade on postgres servers
Next
From: "David G. Johnston"
Date:
Subject: Re: Is the resultset from these queries has_table_privilege and information_schema.role_table_grants supposed to match?