SELECT table_catalog, table_schema, table_name, privilege_type FROM information_schema.table_privileges
WHERE grantee = 'MY_USER'
SELECT grantee,table_catalog, table_schema, table_name, privilege_type
FROM information_schema.table_privileges
WHERE grantee not in ('pg_monitor','PUBLIC');
select list of roles in postgresql:
SELECT
rolname
FROM
pg_roles;
locate HBA files
+++++++++++++++
SELECT
name
, setting
FROM
pg_settings
WHERE
name
LIKE
'%hba%'
;
*****************************************************
To check user having password:
select usename,passwd from pg_shadow where passwd IS NOT NULL
*********************************************************
No comments:
Post a Comment