Introduces ROLE_MONITOR_COMPAT macro

DEFAULT_ROLE_MONITOR is renamed to ROLE_PG_MONITOR
This macro uses appropriate one

Relevant PG commit:
c9c41c7a337d3e2deb0b2a193e9ecfb865d8f52b
pull/5209/head
Halil Ozan Akgul 2021-08-11 15:38:21 +03:00 committed by Sait Talha Nisanci
parent 4bc0c80bba
commit 3c10e0f568
2 changed files with 3 additions and 1 deletions

View File

@ -371,7 +371,7 @@ StoreAllActiveTransactions(Tuplestorestate *tupleStore, TupleDesc tupleDescripto
memset(values, 0, sizeof(values));
memset(isNulls, false, sizeof(isNulls));
if (is_member_of_role(userId, DEFAULT_ROLE_MONITOR))
if (is_member_of_role(userId, ROLE_PG_MONITOR))
{
showAllTransactions = true;
}

View File

@ -33,9 +33,11 @@
#if PG_VERSION_NUM >= PG_VERSION_14
#define AlterTableStmtObjType(a) ((a)->objtype)
#define F_NEXTVAL_COMPAT F_NEXTVAL
#define ROLE_MONITOR_COMPAT ROLE_PG_MONITOR
#else
#define AlterTableStmtObjType(a) ((a)->relkind)
#define F_NEXTVAL_COMPAT F_NEXTVAL_OID
#define ROLE_MONITOR_COMPAT DEFAULT_ROLE_MONITOR
#endif
#if PG_VERSION_NUM >= PG_VERSION_13