postgres.git / summary / log / commit / refs
commit b45fa793406d6007a787c586c1960b1ffc2ef2fb
Author: Peter Eisentraut <peter@eisentraut.org>
Date: Mon Feb 14 20:29:45 2022 +0000
First released in: 15.0
Remove one use of pg_atoi()
There was no real need to use this here instead of a simpler API.
Reviewed-by: John Naylor <john.naylor@enterprisedb.com>
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 7a251b892d7..7311d12e35a 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; }
;
[parent: cfc7191dfea3]