Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 62aa2bb

Browse filesBrowse files
committed
Remove use of [U]INT64_FORMAT in some translatable strings
%lld with (long long), or %llu with (unsigned long long) are more adapted. This is similar to 3286065. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20210421.200000.1462448394029407895.horikyota.ntt@gmail.com
1 parent bb684c8 commit 62aa2bb
Copy full SHA for 62aa2bb

File tree

Expand file treeCollapse file tree

3 files changed

+18
-19
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+18
-19
lines changed

‎contrib/pg_prewarm/pg_prewarm.c

Copy file name to clipboardExpand all lines: contrib/pg_prewarm/pg_prewarm.c
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ pg_prewarm(PG_FUNCTION_ARGS)
126126
if (first_block < 0 || first_block >= nblocks)
127127
ereport(ERROR,
128128
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
129-
errmsg("starting block number must be between 0 and " INT64_FORMAT,
130-
nblocks - 1)));
129+
errmsg("starting block number must be between 0 and %lld",
130+
(long long) (nblocks - 1))));
131131
}
132132
if (PG_ARGISNULL(4))
133133
last_block = nblocks - 1;
@@ -137,8 +137,8 @@ pg_prewarm(PG_FUNCTION_ARGS)
137137
if (last_block < 0 || last_block >= nblocks)
138138
ereport(ERROR,
139139
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
140-
errmsg("ending block number must be between 0 and " INT64_FORMAT,
141-
nblocks - 1)));
140+
errmsg("ending block number must be between 0 and %lld",
141+
(long long) (nblocks - 1))));
142142
}
143143

144144
/* Now we're ready to do the real work. */

‎src/backend/access/transam/xlogprefetch.c

Copy file name to clipboardExpand all lines: src/backend/access/transam/xlogprefetch.c
+11-12Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -358,20 +358,19 @@ XLogPrefetcherFree(XLogPrefetcher *prefetcher)
358358
/* Log final statistics. */
359359
ereport(LOG,
360360
(errmsg("recovery finished prefetching at %X/%X; "
361-
"prefetch = " UINT64_FORMAT ", "
362-
"skip_hit = " UINT64_FORMAT ", "
363-
"skip_new = " UINT64_FORMAT ", "
364-
"skip_fpw = " UINT64_FORMAT ", "
365-
"skip_seq = " UINT64_FORMAT ", "
361+
"prefetch = %llu, "
362+
"skip_hit = %llu, "
363+
"skip_new = %llu, "
364+
"skip_fpw = %llu, "
365+
"skip_seq = %llu, "
366366
"avg_distance = %f, "
367367
"avg_queue_depth = %f",
368-
(uint32) (prefetcher->reader->EndRecPtr << 32),
369-
(uint32) (prefetcher->reader->EndRecPtr),
370-
pg_atomic_read_u64(&SharedStats->prefetch),
371-
pg_atomic_read_u64(&SharedStats->skip_hit),
372-
pg_atomic_read_u64(&SharedStats->skip_new),
373-
pg_atomic_read_u64(&SharedStats->skip_fpw),
374-
pg_atomic_read_u64(&SharedStats->skip_seq),
368+
LSN_FORMAT_ARGS(prefetcher->reader->EndRecPtr),
369+
(unsigned long long) pg_atomic_read_u64(&SharedStats->prefetch),
370+
(unsigned long long) pg_atomic_read_u64(&SharedStats->skip_hit),
371+
(unsigned long long) pg_atomic_read_u64(&SharedStats->skip_new),
372+
(unsigned long long) pg_atomic_read_u64(&SharedStats->skip_fpw),
373+
(unsigned long long) pg_atomic_read_u64(&SharedStats->skip_seq),
375374
SharedStats->avg_distance,
376375
SharedStats->avg_queue_depth)));
377376
hash_destroy(prefetcher->filter_table);

‎src/bin/pgbench/pgbench.c

Copy file name to clipboardExpand all lines: src/bin/pgbench/pgbench.c
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5359,8 +5359,8 @@ parseScriptWeight(const char *option, char **script)
53595359
}
53605360
if (wtmp > INT_MAX || wtmp < 0)
53615361
{
5362-
pg_log_fatal("weight specification out of range (0 .. %u): " INT64_FORMAT,
5363-
INT_MAX, (int64) wtmp);
5362+
pg_log_fatal("weight specification out of range (0 .. %u): %lld",
5363+
INT_MAX, (long long) wtmp);
53645364
exit(1);
53655365
}
53665366
weight = wtmp;
@@ -5680,7 +5680,7 @@ set_random_seed(const char *seed)
56805680
}
56815681

56825682
if (seed != NULL)
5683-
pg_log_info("setting random seed to " UINT64_FORMAT, iseed);
5683+
pg_log_info("setting random seed to %llu", (unsigned long long) iseed);
56845684
random_seed = iseed;
56855685

56865686
/* Fill base_random_sequence with low-order bits of seed */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.