Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e45ff38

Browse filesBrowse files
author
Marina Polyakova
committed
PGPRO-6864: do not use the function pg_atoi if possible
In PostgreSQL version 12 or higher it's more effecient to use the function pg_strtoint32 instead (see the commit 86eaf208ea048936df6be77276a246d3f92e9620). And in PostgreSQL 15 the function pg_atoi was removed altogether (see the commit 73508475d69e90f98ebd9b7e1a5933a26a49c5e9). Therefore if possible use the function pg_strtoint32 instead.
1 parent 3293e48 commit e45ff38
Copy full SHA for e45ff38

File tree

1 file changed

+4
-0
lines changed
Filter options

1 file changed

+4
-0
lines changed

‎jsquery_gram.y

Copy file name to clipboardExpand all lines: jsquery_gram.y
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ makeIndexArray(string *s)
7171
{
7272
JsQueryParseItem* v = makeItemType(jqiIndexArray);
7373

74+
#if PG_VERSION_NUM >= 120000
75+
v->arrayIndex = pg_strtoint32(s->val);
76+
#else
7477
v->arrayIndex = pg_atoi(s->val, 4, 0);
78+
#endif
7579

7680
return v;
7781
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.