消除编译时逻辑比较符的括号警告
This commit is contained in:
2
src/common/backend/utils/cache/relcache.cpp
vendored
2
src/common/backend/utils/cache/relcache.cpp
vendored
@ -1367,7 +1367,7 @@ HeapTuple ScanPgRelation(Oid targetRelId, bool indexOK, bool force_non_historic)
|
||||
* relfilenode of non mapped system relations during decoding.
|
||||
*/
|
||||
snapshot = SnapshotNow;
|
||||
if (HistoricSnapshotActive() && !force_non_historic || IS_EXRTO_RECOVERY_IN_PROGRESS) {
|
||||
if ((HistoricSnapshotActive() && !force_non_historic) || IS_EXRTO_RECOVERY_IN_PROGRESS) {
|
||||
snapshot = GetCatalogSnapshot();
|
||||
}
|
||||
|
||||
|
@ -790,7 +790,7 @@ void check_encoding_locale_matches(int encoding, const char* collate, const char
|
||||
#ifdef WIN32
|
||||
encoding == PG_UTF8 ||
|
||||
#endif
|
||||
(encoding == PG_SQL_ASCII && superuser() ||
|
||||
((encoding == PG_SQL_ASCII && superuser()) ||
|
||||
(encoding == PG_GB18030_2022 && ctype_encoding == PG_GB18030))))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
@ -802,7 +802,7 @@ void check_encoding_locale_matches(int encoding, const char* collate, const char
|
||||
#ifdef WIN32
|
||||
encoding == PG_UTF8 ||
|
||||
#endif
|
||||
(encoding == PG_SQL_ASCII && superuser() ||
|
||||
((encoding == PG_SQL_ASCII && superuser()) ||
|
||||
(encoding == PG_GB18030_2022 && collate_encoding == PG_GB18030))))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
|
@ -1299,7 +1299,7 @@ bool PortalRun(
|
||||
}
|
||||
|
||||
/* PortalRun using unique_sql_start_time as unique sql elapse start time */
|
||||
if (IsNeedUpdateUniqueSQLStat(portal) && IS_UNIQUE_SQL_TRACK_TOP && IsTopUniqueSQL()
|
||||
if ((IsNeedUpdateUniqueSQLStat(portal) && IS_UNIQUE_SQL_TRACK_TOP && IsTopUniqueSQL())
|
||||
|| IS_UNIQUE_SQL_TRACK_ALL) {
|
||||
instr_unique_sql_report_elapse_time(u_sess->unique_sql_cxt.unique_sql_start_time);
|
||||
}
|
||||
|
Reference in New Issue
Block a user