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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy