1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Use PRI?64 instead of "ll?" in format strings (continued).

Continuation of work started in commit 15a79c73, after initial trial.

Author: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/b936d2fb-590d-49c3-a615-92c3a88c6c19%40eisentraut.org
This commit is contained in:
Peter Eisentraut
2025-03-29 10:30:08 +01:00
parent a0a4601765
commit a0ed19e0a9
54 changed files with 302 additions and 311 deletions

View File

@@ -248,7 +248,7 @@ write_csvlog(ErrorData *edata)
appendStringInfoChar(&buf, ',');
/* query id */
appendStringInfo(&buf, "%lld", (long long) pgstat_get_my_query_id());
appendStringInfo(&buf, "%" PRId64, pgstat_get_my_query_id());
appendStringInfoChar(&buf, '\n');

View File

@@ -3152,11 +3152,11 @@ log_status_format(StringInfo buf, const char *format, ErrorData *edata)
break;
case 'Q':
if (padding != 0)
appendStringInfo(buf, "%*lld", padding,
(long long) pgstat_get_my_query_id());
appendStringInfo(buf, "%*" PRId64, padding,
pgstat_get_my_query_id());
else
appendStringInfo(buf, "%lld",
(long long) pgstat_get_my_query_id());
appendStringInfo(buf, "%" PRId64,
pgstat_get_my_query_id());
break;
default:
/* format error - ignore it */

View File

@@ -284,8 +284,8 @@ write_jsonlog(ErrorData *edata)
}
/* query id */
appendJSONKeyValueFmt(&buf, "query_id", false, "%lld",
(long long) pgstat_get_my_query_id());
appendJSONKeyValueFmt(&buf, "query_id", false, "%" PRId64,
pgstat_get_my_query_id());
/* Finish string */
appendStringInfoChar(&buf, '}');