aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-07-11 14:01:00 +0900
committerMichael Paquier <michael@paquier.xyz>2023-07-11 14:01:00 +0900
commit11f36694091c97318e5a2bd28b35ffe9aa1c3b6a (patch)
treeb0e7c5b02c8727da8b812424b1abef4ab7f964d5 /src
parent46ebdfe164c61fbac961d1eb7f40e9a684289ae6 (diff)
downloadpostgresql-11f36694091c97318e5a2bd28b35ffe9aa1c3b6a.tar.gz
postgresql-11f36694091c97318e5a2bd28b35ffe9aa1c3b6a.zip
pgbench: Move constant into format string
As coded, the row data strings generated for pgbench_accounts' COPY in the client-side data generation were always assigning 0 for one of its attributes. This simplifies a bit an upcoming patch to switch client-side data generation of pgbench to use COPY for the teller and branch tables, rather than individual INSERTs. Author: Tristan Partin Discussion: https://postgr.es/m/CSTU5P82ONZ1.19XFUGHMXHBRY@c3po
Diffstat (limited to 'src')
-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 1d1670d4c2b..320d348a0fe 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -4947,8 +4947,8 @@ initGenerateDataClientSide(PGconn *con)
/* "filler" column defaults to blank padded empty string */
printfPQExpBuffer(&sql,
- INT64_FORMAT "\t" INT64_FORMAT "\t%d\t\n",
- j, k / naccounts + 1, 0);
+ INT64_FORMAT "\t" INT64_FORMAT "\t0\t\n",
+ j, k / naccounts + 1);
if (PQputline(con, sql.data))
pg_fatal("PQputline failed");