Skip to content

Commit 667726f

Browse files
committed
pg_stat_statements: Remove unnecessary call to GetUserId()
The same is done a couple of lines above, so there is no need for the same, extra, call. Author: Dong Wook Lee Reviewed-by: Julien Rouhaud Discussion: https://postgr.es/m/CAAcBya+szDd1Y6dJU4_dbH_Ye3=G=8O1oQGG01kv3Tpie7wELQ@mail.gmail.com
1 parent d1b307e commit 667726f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pg_stat_statements/pg_stat_statements.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ pg_stat_statements_internal(FunctionCallInfo fcinfo,
15081508
pgssEntry *entry;
15091509

15101510
/* Superusers or members of pg_read_all_stats members are allowed */
1511-
is_allowed_role = is_member_of_role(GetUserId(), ROLE_PG_READ_ALL_STATS);
1511+
is_allowed_role = is_member_of_role(userid, ROLE_PG_READ_ALL_STATS);
15121512

15131513
/* hash table must exist already */
15141514
if (!pgss || !pgss_hash)

0 commit comments

Comments
 (0)