git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e2d870)
Fix format specifier for NOTICE in copyfrom.c
2024年1月16日 22:59:44 +0000 (00:59 +0200)
2024年1月16日 22:59:44 +0000 (00:59 +0200)
It's incorrect to use %lz for 64-bit numbers on 32-bit machine.


diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c
index 46b23e345b84366af44abb509457c485ca7da6a8..4058b08134d1a866412fd8ccaabe9b06b8991655 100644 (file)
--- a/src/backend/commands/copyfrom.c
+++ b/src/backend/commands/copyfrom.c
@@ -1310,10 +1310,10 @@ CopyFrom(CopyFromState cstate)
if (cstate->opts.save_error_to != COPY_SAVE_ERROR_TO_ERROR &&
cstate->num_errors > 0)
ereport(NOTICE,
- errmsg_plural("%zd row were skipped due to data type incompatibility",
- "%zd rows were skipped due to data type incompatibility",
- cstate->num_errors,
- cstate->num_errors));
+ errmsg_plural("%llu row were skipped due to data type incompatibility",
+ "%llu rows were skipped due to data type incompatibility",
+ (unsigned long long) cstate->num_errors,
+ (unsigned long long) cstate->num_errors));
if (bistate != NULL)
FreeBulkInsertState(bistate);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /