MCPcopy Create free account
hub / github.com/apache/cloudberry / parser_coercion_errposition

Function parser_coercion_errposition

src/backend/parser/parse_coerce.c:1320–1329  ·  view source on GitHub ↗

* parser_coercion_errposition - report coercion error location, if possible * * We prefer to point at the coercion request (CAST, ::, etc) if possible; * but there may be no such location in the case of an implicit coercion. * In that case point at the input expression. * * XXX possibly this is more generally useful than coercion errors; * if so, should rename and place with parser_errposit

Source from the content-addressed store, hash-verified

1318 * if so, should rename and place with parser_errposition.
1319 */
1320void
1321parser_coercion_errposition(ParseState *pstate,
1322 int coerce_location,
1323 Node *input_expr)
1324{
1325 if (coerce_location >= 0)
1326 parser_errposition(pstate, coerce_location);
1327 else
1328 parser_errposition(pstate, exprLocation(input_expr));
1329}
1330
1331
1332/*

Callers 2

coerce_record_to_complexFunction · 0.85
transformTypeCastFunction · 0.85

Calls 2

parser_errpositionFunction · 0.85
exprLocationFunction · 0.85

Tested by

no test coverage detected