提交 22cc3b35 编写于 作者: B Bruce Momjian

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 least
four hex digits, with zero-padding.
上级 b72bd3d1
......@@ -1970,7 +1970,7 @@ log_line_prefix(StringInfo buf, ErrorData *edata)
}
break;
case 'c':
appendStringInfo(buf, "%lx.%x", (long) (MyStartTime), MyProcPid);
appendStringInfo(buf, "%lx.%04x", (long) (MyStartTime), MyProcPid);
break;
case 'p':
appendStringInfo(buf, "%d", MyProcPid);
......@@ -2149,7 +2149,7 @@ write_csvlog(ErrorData *edata)
appendStringInfoChar(&buf, ',');
/* session id */
appendStringInfo(&buf, "%lx.%x", (long) MyStartTime, MyProcPid);
appendStringInfo(&buf, "%lx.%04x", (long) MyStartTime, MyProcPid);
appendStringInfoChar(&buf, ',');
/* Line number */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册