Re: PATCH: numeric timestamp in log_line_prefix

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PATCH: numeric timestamp in log_line_prefix
Date: 2015-08-22 18:39:58
Message-ID: 55D8C1FE.3040107@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

attached is a v2 of the patch, reworked based on the comments.

1) fix the docs (explicitly say that it's a Unix epoch)

2) handle 'padding' properly

3) get rid of timestamp_str - use appendString* methods directly

4) support just the "with milliseconds" using '%n' escape sequence

All those changes are quite trivial. The only annoying bit is that both
'%u' and '%e' are already used, so none of the obvious choices for 'Unix
Epoch' are available. So I simply took (%m+1) which is %n.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
log-line-prefix-numeric-timestamp-v2.patch text/x-diff 1.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-08-22 19:53:20 Re: Error message with plpgsql CONTINUE
Previous Message Jeff Janes 2015-08-22 18:34:42 Re: Test code is worth the space