* 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
| 1318 | * if so, should rename and place with parser_errposition. |
| 1319 | */ |
| 1320 | void |
| 1321 | parser_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 | /* |
no test coverage detected