diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/parser/analyze.h | 3 | ||||
-rw-r--r-- | src/include/parser/parse_node.h | 5 | ||||
-rw-r--r-- | src/include/parser/parse_target.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/include/parser/analyze.h b/src/include/parser/analyze.h index a7e5c55ab4f..17259409a72 100644 --- a/src/include/parser/analyze.h +++ b/src/include/parser/analyze.h @@ -29,7 +29,8 @@ extern Query *parse_analyze_varparams(RawStmt *parseTree, const char *sourceText extern Query *parse_sub_analyze(Node *parseTree, ParseState *parentParseState, CommonTableExpr *parentCTE, - bool locked_from_parent); + bool locked_from_parent, + bool resolve_unknowns); extern Query *transformTopLevelStmt(ParseState *pstate, RawStmt *parseTree); extern Query *transformStmt(ParseState *pstate, Node *parseTree); diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h index bc3eea9ba5a..3a25d9598d6 100644 --- a/src/include/parser/parse_node.h +++ b/src/include/parser/parse_node.h @@ -150,6 +150,9 @@ typedef Node *(*CoerceParamHook) (ParseState *pstate, Param *param, * p_locked_from_parent: true if parent query level applies FOR UPDATE/SHARE * to this subquery as a whole. * + * p_resolve_unknowns: resolve unknown-type SELECT output columns as type TEXT + * (this is true by default). + * * p_hasAggs, p_hasWindowFuncs, etc: true if we've found any of the indicated * constructs in the query. * @@ -182,6 +185,8 @@ struct ParseState List *p_locking_clause; /* raw FOR UPDATE/FOR SHARE info */ bool p_locked_from_parent; /* parent has marked this subquery * with FOR UPDATE/FOR SHARE */ + bool p_resolve_unknowns; /* resolve unknown-type SELECT outputs + * as type text */ /* Flags telling about things found in the query: */ bool p_hasAggs; diff --git a/src/include/parser/parse_target.h b/src/include/parser/parse_target.h index e035aacbf4f..d06a235df0b 100644 --- a/src/include/parser/parse_target.h +++ b/src/include/parser/parse_target.h @@ -21,6 +21,7 @@ extern List *transformTargetList(ParseState *pstate, List *targetlist, ParseExprKind exprKind); extern List *transformExpressionList(ParseState *pstate, List *exprlist, ParseExprKind exprKind, bool allowDefault); +extern void resolveTargetListUnknowns(ParseState *pstate, List *targetlist); extern void markTargetListOrigins(ParseState *pstate, List *targetlist); extern TargetEntry *transformTargetEntry(ParseState *pstate, Node *node, Node *expr, ParseExprKind exprKind, |