Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit73d33be

Browse files
committed
Remove INT64_HEX_FORMAT and UINT64_HEX_FORMAT
These were introduced (commitefdc7d7) at the same time as we weremoving to using the standard inttypes.h format macros (commita0ed19e). It doesn't seem useful to keep a new already-deprecatedinterface like this with only a few users, so remove the new symbolsagain and have the callers use PRIx64.(Also, INT64_HEX_FORMAT was kind of a misnomer, since hex formats alluse unsigned types.)Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>Reviewed-by: Thomas Munro <thomas.munro@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/0ac47b5d-e5ab-4cac-98a7-bdee0e2831e4%40eisentraut.org
1 parent8c7445a commit73d33be

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed

‎contrib/postgres_fdw/option.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ process_pgfdw_appname(const char *appname)
522522
appendStringInfoString(&buf,application_name);
523523
break;
524524
case'c':
525-
appendStringInfo(&buf,INT64_HEX_FORMAT".%x",MyStartTime,MyProcPid);
525+
appendStringInfo(&buf,"%"PRIx64".%x",MyStartTime,MyProcPid);
526526
break;
527527
case'C':
528528
appendStringInfoString(&buf,cluster_name);

‎src/backend/utils/error/csvlog.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ write_csvlog(ErrorData *edata)
120120
appendStringInfoChar(&buf,',');
121121

122122
/* session id */
123-
appendStringInfo(&buf,INT64_HEX_FORMAT".%x",MyStartTime,MyProcPid);
123+
appendStringInfo(&buf,"%"PRIx64".%x",MyStartTime,MyProcPid);
124124
appendStringInfoChar(&buf,',');
125125

126126
/* Line number */

‎src/backend/utils/error/elog.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,12 +2959,12 @@ log_status_format(StringInfo buf, const char *format, ErrorData *edata)
29592959
{
29602960
charstrfbuf[128];
29612961

2962-
snprintf(strfbuf,sizeof(strfbuf)-1,INT64_HEX_FORMAT".%x",
2962+
snprintf(strfbuf,sizeof(strfbuf)-1,"%"PRIx64".%x",
29632963
MyStartTime,MyProcPid);
29642964
appendStringInfo(buf,"%*s",padding,strfbuf);
29652965
}
29662966
else
2967-
appendStringInfo(buf,INT64_HEX_FORMAT".%x",MyStartTime,MyProcPid);
2967+
appendStringInfo(buf,"%"PRIx64".%x",MyStartTime,MyProcPid);
29682968
break;
29692969
case'p':
29702970
if (padding!=0)

‎src/backend/utils/error/jsonlog.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ write_jsonlog(ErrorData *edata)
168168
}
169169

170170
/* Session id */
171-
appendJSONKeyValueFmt(&buf,"session_id", true,INT64_HEX_FORMAT".%x",
171+
appendJSONKeyValueFmt(&buf,"session_id", true,"%"PRIx64".%x",
172172
MyStartTime,MyProcPid);
173173

174174
/* Line number */

‎src/include/c.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,6 @@ typedef uint32 bits32;/* >= 32 bits */
530530
/* snprintf format strings to use for 64-bit integers */
531531
#defineINT64_FORMAT "%" PRId64
532532
#defineUINT64_FORMAT "%" PRIu64
533-
#defineINT64_HEX_FORMAT "%" PRIx64
534-
#defineUINT64_HEX_FORMAT "%" PRIx64
535533

536534
/*
537535
* 128-bit signed and unsigned integers

‎src/test/modules/test_radixtree/test_radixtree.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
uint64_expected = (expected_expr); \
4545
if (_result != _expected) \
4646
elog(ERROR, \
47-
"%s yielded" UINT64_HEX_FORMAT ", expected" UINT64_HEX_FORMAT " (%s) in file \"%s\" line %u", \
47+
"%s yielded%" PRIx64 ", expected%" PRIx64 " (%s) in file \"%s\" line %u", \
4848
#result_expr, _result, _expected, #expected_expr, __FILE__, __LINE__); \
4949
} while (0)
5050

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp