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

Commit22cc3b3

Browse files
committed
When outputting the session id in log_line_prefix (%c) or in CSV log
output mode, cause the hex digits after the period to always be at leastfour hex digits, with zero-padding.
1 parentb72bd3d commit22cc3b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,7 @@ log_line_prefix(StringInfo buf, ErrorData *edata)
19701970
}
19711971
break;
19721972
case'c':
1973-
appendStringInfo(buf,"%lx.%x", (long) (MyStartTime),MyProcPid);
1973+
appendStringInfo(buf,"%lx.%04x", (long) (MyStartTime),MyProcPid);
19741974
break;
19751975
case'p':
19761976
appendStringInfo(buf,"%d",MyProcPid);
@@ -2149,7 +2149,7 @@ write_csvlog(ErrorData *edata)
21492149
appendStringInfoChar(&buf,',');
21502150

21512151
/* session id */
2152-
appendStringInfo(&buf,"%lx.%x", (long)MyStartTime,MyProcPid);
2152+
appendStringInfo(&buf,"%lx.%04x", (long)MyStartTime,MyProcPid);
21532153
appendStringInfoChar(&buf,',');
21542154

21552155
/* Line number */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp