I have Azure postgresql single server database which I need to give read permission to a newly created user.
CREATE USER "test@hostName" PASSWORD 'XXXX';
GRANT CONNECT ON DATABASE "test" TO "test@hostName";
ALTER DEFAULT PRIVILEGES
FOR USER pgadmin
IN SCHEMA public
GRANT SELECT ON TABLES TO "test@hostName" ;
SELECT *
FROM information_schema.role_table_grants
WHERE grantee = 'test@hostName';
But when this user executes a select query Permission Denied message appears and not allowed to select. Any help is appreciated.
Below the result for pg_class for the selected table. It shows that pgadmin has full rights and required user has read access.
this is the result I got when running the query:
SELECT relacl FROM pg_class WHERE relname = 'tablename';
result:
"{pgadmin=a*r*w*d*D*x*t*/pgadmin,""\""d_reader@adb-psql-tckt-history\""=r/pgadmin""}"

