src/backend/utils/init/miscinit.c
/*
 * Check whether specified role has explicit REPLICATION privilege
 */
Check whether specified role has explicit REPLICATION privilege
Check whether specified role has explicit REPLICATION privilege
bool
has_rolreplication(Oid roleid)
{
	bool		result = false;
	HeapTuple	utup;
	utup = SearchSysCache1(AUTHOID, ObjectIdGetDatum(roleid));
	if (HeapTupleIsValid(utup))
	{
		result = ((Form_pg_authid) GETSTRUCT(utup))->rolreplication;
		ReleaseSysCache(utup);
	}
	return result;
}
bool has_rolreplication ( Oid roleid ) { bool result = false ; HeapTuple utup ; utup = SearchSysCache1 ( AUTHOID , ObjectIdGetDatum ( roleid ) ) ; if ( HeapTupleIsValid ( utup ) ) { result = ( ( Form_pg_authid ) GETSTRUCT ( utup ) ) -> rolreplication ; ReleaseSysCache ( utup ) ; } return result ; }
Check whether specified role has explicit REPLICATION privilege
Check whether specified role has explicit REPLICATION privilege