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

From Tom Lane
Subject Re: Timezone for %t log_line_prefix
Date
Msg-id 10612.1091653691@sss.pgh.pa.us
Whole thread Raw
In response to Re: Timezone for %t log_line_prefix  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Timezone for %t log_line_prefix
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> 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.

Does Windows' strftime have any short zone name %-spec?  Seems like a
quick #ifdef WIN32 to use a more compact zone name would be the best
solution.

I'd be inclined to leave out the zone field *on Windows only* if there
is no %-spec that uses something more reasonable.  I don't think this
problem justifies adding more %-options to log_line_prefix.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PITR - recovery to a particular transaction
Next
From: Andreas Pflug
Date:
Subject: Re: Timezone for %t log_line_prefix