summaryrefslogtreecommitdiff
path: root/src/bin/pgbench
diff options
context:
space:
mode:
authorPeter Eisentraut2022-02-14 20:29:45 +0000
committerPeter Eisentraut2022-02-14 20:57:26 +0000
commitcfc7191dfea330dd7a71e940d59de78129bb6175 (patch)
treed1d6bc5dbade67b536fc09457b2e71a6fad61c4a /src/bin/pgbench
parent291ec6e45ebe1a87f930a250ad3c6672472b9b19 (diff)
Move scanint8() to numutils.c
Move scanint8() to numutils.c and rename to pg_strtoint64(). We already have a "16" and "32" version of that, and the code inside the functions was aligned, so this move makes all three versions consistent. The API is also changed to no longer provide the errorOK case. Users that need the error checking can use strtoi64(). Reviewed-by: John Naylor <john.naylor@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb97d@enterprisedb.com
Diffstat (limited to 'src/bin/pgbench')
-rw-r--r--src/bin/pgbench/pgbench.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 97f2a1f80ae..f166a77e3a7 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -787,8 +787,8 @@ is_an_int(const char *str)
/*
* strtoint64 -- convert a string to 64-bit integer
*
- * This function is a slightly modified version of scanint8() from
- * src/backend/utils/adt/int8.c.
+ * This function is a slightly modified version of pg_strtoint64() from
+ * src/backend/utils/adt/numutils.c.
*
* The function returns whether the conversion worked, and if so
* "*result" is set to the result.