Re: Timezone for %t log_line_prefix - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Timezone for %t log_line_prefix
Date
Msg-id 41114919.5060700@dunslane.net
Whole thread Raw
In response to Timezone for %t log_line_prefix  (Andreas Pflug <pgadmin@pse-consulting.de>)
Responses Re: Timezone for %t log_line_prefix  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Andreas Pflug wrote:

> If %t is used in log_line_prefix, win32's strftime will print a very 
> long timezone information, e.g. "W. Europe Daylight Time" where Linux 
> would write "UTC". This makes the timestamp consuming more than half 
> of an average line length.
> Do we have alternatives to the long form? Do we need the timezone 
> information at all? We know already it's the server's time. Another 
> alternative would be a short timestamp (%t vs. %T) to have both.
>
>

That's ugly, and unfortunately %z is GNU-specific. The quick fix for now 
does seem to be providing alternative forms - %T and %S make sense. Of 
course, if we wanted it *really* short we could just print out the 
current epoch time in 8 hex digits :-)

cheers

andrew


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Timezone for %t log_line_prefix
Next
From: Jonathan Gardner
Date:
Subject: Re: Updateable Views?