mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
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.
This commit is contained in:
@ -1970,7 +1970,7 @@ log_line_prefix(StringInfo buf, ErrorData *edata)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
appendStringInfo(buf, "%lx.%x", (long) (MyStartTime), MyProcPid);
|
appendStringInfo(buf, "%lx.%04x", (long) (MyStartTime), MyProcPid);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
appendStringInfo(buf, "%d", MyProcPid);
|
appendStringInfo(buf, "%d", MyProcPid);
|
||||||
@ -2149,7 +2149,7 @@ write_csvlog(ErrorData *edata)
|
|||||||
appendStringInfoChar(&buf, ',');
|
appendStringInfoChar(&buf, ',');
|
||||||
|
|
||||||
/* session id */
|
/* session id */
|
||||||
appendStringInfo(&buf, "%lx.%x", (long) MyStartTime, MyProcPid);
|
appendStringInfo(&buf, "%lx.%04x", (long) MyStartTime, MyProcPid);
|
||||||
appendStringInfoChar(&buf, ',');
|
appendStringInfoChar(&buf, ',');
|
||||||
|
|
||||||
/* Line number */
|
/* Line number */
|
||||||
|
Reference in New Issue
Block a user