Permission in PostgreSQL

0

I want to run a query on a PostgreSQL-type database. The query is as follows:

select *from pg_stat_activity;

But I want this to be done by a user who only has read permission. The user should not be allowed to select in the tables because it is only to see who is connected to the bank, not being able to see tables such as "Passwords" for example.

In this sense I gave permission only to the user to see the tables of the system catalog.

But when a different user connects to the database, his IP address does not appear and the query column says that he is not allowed to see what query he has done.

How can I give permission for this data to be shown without giving the user permission to access common tables?

    
asked by anonymous 31.10.2018 / 18:48

0 answers