Re: PATCH: numeric timestamp in log_line_prefix

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: PATCH: numeric timestamp in log_line_prefix
Дата
Msg-id alpine.DEB.2.10.1503221652340.14445@sto
обсуждение исходный текст
Ответ на PATCH: numeric timestamp in log_line_prefix  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: PATCH: numeric timestamp in log_line_prefix  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Euler Taveira
Дата:
Сообщение: Re: Remove fsync ON/OFF as a visible option?
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Zero-padding and zero-masking fixes for to_char(float)