!4561 monitor admin用户查询函数pg_prepared_statements报错问题修复

Merge pull request !4561 from 姜岩/prepared_statement
This commit is contained in:
opengauss_bot
2023-12-05 01:47:15 +00:00
committed by Gitee

View File

@ -1558,7 +1558,7 @@ Datum pg_prepared_statement(PG_FUNCTION_ARGS)
Datum pg_prepared_statement_global(PG_FUNCTION_ARGS)
{
if (!superuser()) {
if (!superuser() && !isMonitoradmin(GetUserId())) {
aclcheck_error(ACLCHECK_NO_PRIV, ACL_KIND_PROC, "pg_prepared_statements");
}