mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
Simplify pg_has_role() call
Specifying CURRENT_USER is superfluous here.
This commit is contained in:
@@ -373,9 +373,9 @@ connection_has_pg_settings(PGconn *conn)
|
|||||||
initPQExpBuffer(&query);
|
initPQExpBuffer(&query);
|
||||||
appendPQExpBufferStr(&query,
|
appendPQExpBufferStr(&query,
|
||||||
" SELECT CASE "
|
" SELECT CASE "
|
||||||
" WHEN pg_catalog.pg_has_role(CURRENT_USER, 'pg_monitor','MEMBER') "
|
" WHEN pg_catalog.pg_has_role('pg_monitor','MEMBER') "
|
||||||
" THEN TRUE "
|
" THEN TRUE "
|
||||||
" WHEN pg_catalog.pg_has_role(CURRENT_USER, 'pg_read_all_settings','MEMBER') "
|
" WHEN pg_catalog.pg_has_role('pg_read_all_settings','MEMBER') "
|
||||||
" THEN TRUE "
|
" THEN TRUE "
|
||||||
" ELSE FALSE "
|
" ELSE FALSE "
|
||||||
" END AS has_pg_settings");
|
" END AS has_pg_settings");
|
||||||
|
|||||||
Reference in New Issue
Block a user