Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-16 Thread Magnus Hagander
>Since we do have control over the timezone library now, one possible >answer is to extend the src/timezone API so that it's possible to >convert/format against more than a single timezone. We could then >remember the zone setting inherited from the postmaster and always use >that when formatting

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-16 Thread Magnus Hagander
>> 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. No. This is what the cruft in pgtz.c (TZABBREV macro and associated function) was all abou

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-05 Thread Andrew Dunstan
Greg Stark wrote: Tom Lane <[EMAIL PROTECTED]> writes: However, this is probably a bit more work than is reasonable to undertake right now, when we're already overdue for beta. For the moment I'm really thinking that we ought to just #ifdef out the %Z on Windows, and plan to do something nicer

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-04 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > However, this is probably a bit more work than is reasonable to > undertake right now, when we're already overdue for beta. For the > moment I'm really thinking that we ought to just #ifdef out the %Z > on Windows, and plan to do something nicer in 8.1. Co

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-04 Thread Andrew Dunstan
Tom Lane said: > > Since we do have control over the timezone library now, one possible > answer is to extend the src/timezone API so that it's possible to > convert/format against more than a single timezone. We could then > remember the zone setting inherited from the postmaster and always use >

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-04 Thread Tom Lane
Andreas Pflug <[EMAIL PROTECTED]> writes: > I don't have a problem with either way, but it appears desirable if > there would be a log_line_prefix option that gives identical result on > all systems. Well, the Right Thing (TM) would be to use our src/timezone code instead of the local C library.

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-04 Thread Bruce Momjian
Well, I see this in pgtz.c: {"Eastern Standard Time", "Eastern Daylight Time", "US/Eastern"}, /* (GMT-05:00) Eastern Time (US & Canada) */ Can't we use this to map to slightly shorter names? --- Andre

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-04 Thread Andreas Pflug
Tom Lane wrote: 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 already checked; unfortunately there's no short zone option. %z and %Z give identical output. I'd be inclined to leave out the zon

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-04 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> 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 aver

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-04 Thread Andrew Dunstan
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 for

[HACKERS] Timezone for %t log_line_prefix

2004-08-04 Thread Andreas Pflug
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 time