PG-175: Only Superuser / Privileged user can view IP address.

This commit is contained in:
Ibrar Ahmed
2021-02-11 12:41:21 +00:00
parent a6036b86ac
commit ce9d503cdb
2 changed files with 10 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ CREATE FUNCTION pg_stat_monitor(IN showtext boolean,
OUT bucket int,
OUT userid oid,
OUT dbid oid,
OUT client_ip bigint,
OUT client_ip int8,
OUT queryid text,
OUT query text,
@@ -202,6 +202,7 @@ end loop;
END
$$ language plpgsql;
GRANT SELECT ON pg_stat_monitor TO PUBLIC;
GRANT SELECT ON pg_stat_monitor_settings TO PUBLIC;
-- Don't want this to be available to non-superusers.
REVOKE ALL ON FUNCTION pg_stat_monitor_reset() FROM PUBLIC;