From d070b97113883c1f6efbe2aaaf05dd5640cf3b1a Mon Sep 17 00:00:00 2001 From: Henson Choi Date: Mon, 1 Jun 2026 10:14:33 +0900 Subject: [PATCH 27/68] Restore findTargetlistEntrySQL99 to static per Tatsuo Ishii's review The RPR DEFINE handling once called findTargetlistEntrySQL99 from parse_rpr.c, which required exposing it as extern. The Var-only targetlist fix removed that cross-file call, so revert the function to its original static linkage and drop the prototype from parse_clause.h. --- src/backend/parser/parse_clause.c | 4 +++- src/include/parser/parse_clause.h | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 3201a22d278..550ea4eb9c0 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -89,6 +89,8 @@ static void checkExprIsVarFree(ParseState *pstate, Node *n, const char *constructName); static TargetEntry *findTargetlistEntrySQL92(ParseState *pstate, Node *node, List **tlist, ParseExprKind exprKind); +static TargetEntry *findTargetlistEntrySQL99(ParseState *pstate, Node *node, + List **tlist, ParseExprKind exprKind); static int get_matching_location(int sortgroupref, List *sortgrouprefs, List *exprs); static List *resolve_unique_index_expr(ParseState *pstate, InferClause *infer, @@ -2310,7 +2312,7 @@ findTargetlistEntrySQL92(ParseState *pstate, Node *node, List **tlist, * tlist the target list (passed by reference so we can append to it) * exprKind identifies clause type being processed */ -TargetEntry * +static TargetEntry * findTargetlistEntrySQL99(ParseState *pstate, Node *node, List **tlist, ParseExprKind exprKind) { diff --git a/src/include/parser/parse_clause.h b/src/include/parser/parse_clause.h index 8aaac881f2b..fe234611007 100644 --- a/src/include/parser/parse_clause.h +++ b/src/include/parser/parse_clause.h @@ -52,9 +52,6 @@ extern List *addTargetToSortList(ParseState *pstate, TargetEntry *tle, extern Index assignSortGroupRef(TargetEntry *tle, List *tlist); extern bool targetIsInSortList(TargetEntry *tle, Oid sortop, List *sortList); -extern TargetEntry *findTargetlistEntrySQL99(ParseState *pstate, Node *node, - List **tlist, ParseExprKind exprKind); - /* functions in parse_jsontable.c */ extern ParseNamespaceItem *transformJsonTable(ParseState *pstate, JsonTable *jt); -- 2.50.1 (Apple Git-155)