Remove one use of pg_atoi()
authorPeter Eisentraut <[email protected]>
Mon, 14 Feb 2022 20:29:45 +0000 (21:29 +0100)
committerPeter Eisentraut <[email protected]>
Mon, 14 Feb 2022 22:07:35 +0000 (23:07 +0100)
There was no real need to use this here instead of a simpler API.

Reviewed-by: John Naylor <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb97d@enterprisedb.com

src/backend/utils/adt/jsonpath_gram.y

index 7a251b892d7f2833b963c9614a8acef75957db5c..7311d12e35ae2b47565e23b1538febd0611e24c0 100644 (file)
@@ -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; }
    ;