From b45fa793406d6007a787c586c1960b1ffc2ef2fb Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 14 Feb 2022 21:29:45 +0100 Subject: [PATCH] Remove one use of pg_atoi() There was no real need to use this here instead of a simpler API. Reviewed-by: John Naylor Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb97d@enterprisedb.com --- src/backend/utils/adt/jsonpath_gram.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/adt/jsonpath_gram.y b/src/backend/utils/adt/jsonpath_gram.y index 7a251b892d..7311d12e35 100644 --- a/src/backend/utils/adt/jsonpath_gram.y +++ b/src/backend/utils/adt/jsonpath_gram.y @@ -232,7 +232,7 @@ array_accessor: ; any_level: - INT_P { $$ = pg_atoi($1.val, 4, 0); } + INT_P { $$ = pg_strtoint32($1.val); } | LAST_P { $$ = -1; } ;