Re: PATCH: numeric timestamp in log_line_prefix

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: numeric timestamp in log_line_prefix
Date: 2015-03-22 19:50:47
Message-ID: 550F1D17.3060505@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22.3.2015 19:45, Fabien COELHO wrote:
>
>>> I'm not sure that the "." in "%.03d" is useful. ISTM that it is used for
>>> floatting point formatting, but is not needed with integers.
>>
>> It is needed for integers, because you need to make sure 1 millisecond
>> is formatted as .001 and not .1.
>
> ISTM that the "03" does that on its own:
>
> sh> printf "%03d\n" 0 1 2
> 000
> 001
> 002

Oh, right - one dot too many. Thanks, will fix that.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2015-03-22 19:54:37 Re: Remove fsync ON/OFF as a visible option?
Previous Message Fabien COELHO 2015-03-22 19:27:53 Re: PATCH: numeric timestamp in log_line_prefix