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

Commitce13bb9

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 parent3e65e77 commitce13bb9

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
@@ -531,7 +531,7 @@ process_pgfdw_appname(const char *appname)
531531
appendStringInfoString(&buf,application_name);
532532
break;
533533
case'c':
534-
appendStringInfo(&buf,INT64_HEX_FORMAT".%x",MyStartTime,MyProcPid);
534+
appendStringInfo(&buf,"%"PRIx64".%x",MyStartTime,MyProcPid);
535535
break;
536536
case'C':
537537
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
@@ -2956,12 +2956,12 @@ log_status_format(StringInfo buf, const char *format, ErrorData *edata)
29562956
{
29572957
charstrfbuf[128];
29582958

2959-
snprintf(strfbuf,sizeof(strfbuf)-1,INT64_HEX_FORMAT".%x",
2959+
snprintf(strfbuf,sizeof(strfbuf)-1,"%"PRIx64".%x",
29602960
MyStartTime,MyProcPid);
29612961
appendStringInfo(buf,"%*s",padding,strfbuf);
29622962
}
29632963
else
2964-
appendStringInfo(buf,INT64_HEX_FORMAT".%x",MyStartTime,MyProcPid);
2964+
appendStringInfo(buf,"%"PRIx64".%x",MyStartTime,MyProcPid);
29652965
break;
29662966
case'p':
29672967
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
@@ -519,8 +519,6 @@ typedef uint32 bits32;/* >= 32 bits */
519519
/* snprintf format strings to use for 64-bit integers */
520520
#defineINT64_FORMAT "%" PRId64
521521
#defineUINT64_FORMAT "%" PRIu64
522-
#defineINT64_HEX_FORMAT "%" PRIx64
523-
#defineUINT64_HEX_FORMAT "%" PRIx64
524522

525523
/*
526524
* 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