From d6f2f91d5618c8fa645dc067426b76eb5f21faeb Mon Sep 17 00:00:00 2001 From: Man Zeng Date: Tue, 24 Feb 2026 16:52:34 +0800 Subject: [PATCH] refactor: Simplify ExecWithoutOverlapsNotEmpty function signature and update related calls --- src/backend/executor/execIndexing.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/executor/execIndexing.c b/src/backend/executor/execIndexing.c index 9d071e495c6..5474061c7b7 100644 --- a/src/backend/executor/execIndexing.c +++ b/src/backend/executor/execIndexing.c @@ -115,6 +115,7 @@ #include "nodes/nodeFuncs.h" #include "storage/lmgr.h" #include "utils/injection_point.h" +#include "utils/lsyscache.h" #include "utils/multirangetypes.h" #include "utils/rangetypes.h" #include "utils/snapmgr.h" @@ -145,7 +146,7 @@ static bool index_unchanged_by_update(ResultRelInfo *resultRelInfo, static bool index_expression_changed_walker(Node *node, Bitmapset *allUpdatedCols); static void ExecWithoutOverlapsNotEmpty(Relation rel, NameData attname, Datum attval, - char typtype, Oid atttypid); + char typtype); /* ---------------------------------------------------------------- * ExecOpenIndices @@ -753,11 +754,10 @@ check_exclusion_or_unique_constraint(Relation heap, Relation index, { TupleDesc tupdesc = RelationGetDescr(heap); Form_pg_attribute att = TupleDescAttr(tupdesc, attno - 1); - TypeCacheEntry *typcache = lookup_type_cache(att->atttypid, 0); ExecWithoutOverlapsNotEmpty(heap, att->attname, values[indnkeyatts - 1], - typcache->typtype, att->atttypid); + get_typtype(att->atttypid)); } } @@ -1149,7 +1149,7 @@ index_expression_changed_walker(Node *node, Bitmapset *allUpdatedCols) * range or multirange in the given attribute. */ static void -ExecWithoutOverlapsNotEmpty(Relation rel, NameData attname, Datum attval, char typtype, Oid atttypid) +ExecWithoutOverlapsNotEmpty(Relation rel, NameData attname, Datum attval, char typtype) { bool isempty; RangeType *r; -- 2.45.2