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:
@@ -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');
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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, '}');
|
||||
|
||||
Reference in New Issue
Block a user