Re: PATCH: numeric timestamp in log_line_prefix - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: PATCH: numeric timestamp in log_line_prefix
Date
Msg-id alpine.DEB.2.10.1503221652340.14445@sto
Whole thread Raw
In response to PATCH: numeric timestamp in log_line_prefix  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: PATCH: numeric timestamp in log_line_prefix
List pgsql-hackers
About the feature: I find it is a good thing. It may help scripting over 
the logs, for instance to compute delays between events, whereas the full 
date-time-tz syntax is maybe nice but heavier to work with afterwards.

In addition to the comments already made (typo in doc, padding...):

+    sprintf(timestamp_str, "%ld.%.03d",
+            tv.tv_sec, (int)(tv.tv_usec / 1000));

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.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Euler Taveira
Date:
Subject: Re: Remove fsync ON/OFF as a visible option?
Next
From: Noah Misch
Date:
Subject: Re: Zero-padding and zero-masking fixes for to_char(float)