Re: Log line prefix on win32

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paesold <mpaesold(at)gmx(dot)at>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Log line prefix on win32
Date: 2004-10-08 17:02:35
Message-ID: 200410081702.i98H2Zw17949@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I am still trying to figure out a good way to fix this. On unix my log
> > shows EDT but Win32 shows US/Eastern and some zones are much longer.
> > Should we add %z and not print the timezone information for %t? That
> > seems like the only reasonable solution.
>
> %z is not standard --- you won't find it in the SUS spec for instance.
> Or were you thinking of exposing this problem at the API level by making
> people write a separate log_line_prefix item to get the timezone? I'm

I was thinking of adding %z as an option to log_line prefix, so to get
the current output you would do '%t %z'. I was not suggesting changing
the %Z passed to strftime if they ask for timezone.

> not thrilled about institutionalizing such a fix for a platform-specific
> issue that might go away later (if we switch to using our own timezone
> code here, for instance).

Right.

> I'd be inclined to #ifdef elog's strftime calls so that the zone is
> omitted on Windows but not elsewhere. Kinda ugly but it's a localized
> fix that we can easily improve later.

Yes, we could go that way too. The decision is a platform-specific change
or omitting it for all outputs.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yann Michel 2004-10-08 17:10:53 Re: plans for bitmap indexes?
Previous Message Josh Berkus 2004-10-08 16:59:41 Re: plans for bitmap indexes?

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-10-08 17:13:09 Re: Log line prefix on win32
Previous Message Tom Lane 2004-10-08 16:50:11 Re: Log line prefix on win32