From d4feadeca1591fd5fe91bdf73a7897553f5366d7 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 29 Nov 2019 09:10:17 +0100 Subject: Add error position to an error message Reviewed-by: Pavel Stehule Discussion: https://www.postgresql.org/message-id/flat/6e7aa4a1-be6a-1a75-b1f9-83a678e5184a@2ndquadrant.com --- src/backend/commands/prepare.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/backend') diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c index 7e0a041fabf..47bae957dc4 100644 --- a/src/backend/commands/prepare.c +++ b/src/backend/commands/prepare.c @@ -381,7 +381,8 @@ EvaluateParams(PreparedStatement *pstmt, List *params, i + 1, format_type_be(given_type_id), format_type_be(expected_type_id)), - errhint("You will need to rewrite or cast the expression."))); + errhint("You will need to rewrite or cast the expression."), + parser_errposition(pstate, exprLocation(lfirst(l))))); /* Take care of collations in the finished expression. */ assign_expr_collations(pstate, expr); -- cgit v1.2.3