Re: [HACKERS] Win32 timezone matching

2010-04-15 Thread Magnus Hagander
On Thu, Apr 15, 2010 at 2:54 AM, Tom Lane t...@sss.pgh.pa.us wrote: [ back to this... ] Magnus Hagander mag...@hagander.net writes: On Wed, Apr 7, 2010 at 21:06, Tom Lane t...@sss.pgh.pa.us wrote: I suppose we had a reason for doing it the first way but I can't see what.  GMT seems a fairly

Re: [HACKERS] Win32 timezone matching

2010-04-15 Thread Magnus Hagander
On Thu, Apr 15, 2010 at 3:48 AM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Wed, Apr 7, 2010 at 21:01, Tom Lane t...@sss.pgh.pa.us wrote: ... lack either the note about defaulting to GMT or the hint.  I guess we should add both of those to the failure

Re: [HACKERS] Win32 timezone matching

2010-04-14 Thread Tom Lane
[ back to this... ] Magnus Hagander mag...@hagander.net writes: On Wed, Apr 7, 2010 at 21:06, Tom Lane t...@sss.pgh.pa.us wrote: I suppose we had a reason for doing it the first way but I can't see what.  GMT seems a fairly English-centric way of referring to UTC anyhow; translators might

Re: [HACKERS] Win32 timezone matching

2010-04-14 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Apr 7, 2010 at 21:01, Tom Lane t...@sss.pgh.pa.us wrote: ... lack either the note about defaulting to GMT or the hint. I guess we should add both of those to the failure cases in the Windows version of identify_system_timezone. Should we

Re: [HACKERS] Win32 timezone matching

2010-04-09 Thread Magnus Hagander
On Wed, Apr 7, 2010 at 00:48, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Wed, Apr 7, 2010 at 00:02, Tom Lane t...@sss.pgh.pa.us wrote: Oh, another thought here: what is the effect of the combination of this with your other proposal to add more timezones

Re: [HACKERS] Win32 timezone matching

2010-04-09 Thread Magnus Hagander
On Wed, Apr 7, 2010 at 21:06, Tom Lane t...@sss.pgh.pa.us wrote: I wrote:         ereport(LOG,                 (errmsg(could not determine system time zone, defaulting to \%s\, GMT), BTW, does anyone remember the reason for making GMT nonlocalizable in these messages?  It seems more

Re: [HACKERS] Win32 timezone matching

2010-04-09 Thread Magnus Hagander
On Wed, Apr 7, 2010 at 21:01, Tom Lane t...@sss.pgh.pa.us wrote: Stefan Kaltenbrunner ste...@kaltenbrunner.cc writes: Even if if keep the current fallback behaviour we should at least fix the windows codepath to do the same as the unix codepath does - as in actually logging that the fallback

Re: [HACKERS] Win32 timezone matching

2010-04-07 Thread Magnus Hagander
On Wed, Apr 7, 2010 at 00:48, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Wed, Apr 7, 2010 at 00:02, Tom Lane t...@sss.pgh.pa.us wrote: Oh, another thought here: what is the effect of the combination of this with your other proposal to add more timezones

Re: [HACKERS] Win32 timezone matching

2010-04-07 Thread Stefan Kaltenbrunner
Magnus Hagander wrote: On Wed, Apr 7, 2010 at 00:48, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Wed, Apr 7, 2010 at 00:02, Tom Lane t...@sss.pgh.pa.us wrote: Oh, another thought here: what is the effect of the combination of this with your other proposal

Re: [HACKERS] Win32 timezone matching

2010-04-07 Thread Tom Lane
Stefan Kaltenbrunner ste...@kaltenbrunner.cc writes: hmm all that code makes me wonder a bit about a more general issue - is the fallback to GMT if we fail to actually make sense of the right imezone to use actually a good idea? What alternative are you proposing? Failing to start the

Re: [HACKERS] Win32 timezone matching

2010-04-07 Thread Stefan Kaltenbrunner
Tom Lane wrote: Stefan Kaltenbrunner ste...@kaltenbrunner.cc writes: hmm all that code makes me wonder a bit about a more general issue - is the fallback to GMT if we fail to actually make sense of the right imezone to use actually a good idea? What alternative are you proposing? Failing to

Re: [HACKERS] Win32 timezone matching

2010-04-07 Thread Robert Haas
On Wed, Apr 7, 2010 at 12:20 PM, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: Tom Lane wrote: Stefan Kaltenbrunner ste...@kaltenbrunner.cc writes: hmm all that code makes me wonder a bit about a more general issue - is the fallback to GMT if we fail to actually make sense of the right

Re: [HACKERS] Win32 timezone matching

2010-04-07 Thread Magnus Hagander
On Wed, Apr 7, 2010 at 7:04 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 7, 2010 at 12:20 PM, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: Tom Lane wrote: Stefan Kaltenbrunner ste...@kaltenbrunner.cc writes: hmm all that code makes me wonder a bit about a more general

Re: [HACKERS] Win32 timezone matching

2010-04-07 Thread Stefan Kaltenbrunner
Magnus Hagander wrote: On Wed, Apr 7, 2010 at 7:04 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 7, 2010 at 12:20 PM, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: Tom Lane wrote: Stefan Kaltenbrunner ste...@kaltenbrunner.cc writes: hmm all that code makes me wonder a bit

Re: [HACKERS] Win32 timezone matching

2010-04-07 Thread Tom Lane
Stefan Kaltenbrunner ste...@kaltenbrunner.cc writes: yeah that is one aspect - and in talking to the OP he would have prefered the database not starting up at all, logging an error and a hint on setting a fixed timezone in the conf. Well, you started from the statement that this was an

Re: [HACKERS] Win32 timezone matching

2010-04-07 Thread Tom Lane
I wrote: ereport(LOG, (errmsg(could not determine system time zone, defaulting to \%s\, GMT), BTW, does anyone remember the reason for making GMT nonlocalizable in these messages? It seems more straightforward to do (errmsg(could not determine system

[HACKERS] Win32 timezone matching

2010-04-06 Thread Magnus Hagander
When diagnosing a problem for a guy in the german channel (with Stefan as mediator :P), we've found a case where the timezone information in the registry seem to be empty for some timezones. The current timezone matching code will abort scanning when it comes across one of these, thus claiming it

Re: [HACKERS] Win32 timezone matching

2010-04-06 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: When diagnosing a problem for a guy in the german channel (with Stefan as mediator :P), we've found a case where the timezone information in the registry seem to be empty for some timezones. The current timezone matching code will abort scanning when

Re: [HACKERS] Win32 timezone matching

2010-04-06 Thread Magnus Hagander
On Tue, Apr 6, 2010 at 23:44, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: When diagnosing a problem for a guy in the german channel (with Stefan as mediator :P), we've found a case where the timezone information in the registry seem to be empty for some

Re: [HACKERS] Win32 timezone matching

2010-04-06 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Tue, Apr 6, 2010 at 23:44, Tom Lane t...@sss.pgh.pa.us wrote: I'm not clear on this.  Would this patch fix a real seen-in-the-field condition, or is it speculative?  In particular, if the loop had kept going in the complainant's machine, would it

Re: [HACKERS] Win32 timezone matching

2010-04-06 Thread Tom Lane
Oh, another thought here: what is the effect of the combination of this with your other proposal to add more timezones to the list? In particular, what happens if we use the extended list in an unpatched system that doesn't know about those new zone names? I'm wondering if we *have* to make this

Re: [HACKERS] Win32 timezone matching

2010-04-06 Thread Magnus Hagander
On Wed, Apr 7, 2010 at 00:02, Tom Lane t...@sss.pgh.pa.us wrote: Oh, another thought here: what is the effect of the combination of this with your other proposal to add more timezones to the list?  In particular, what happens if we use the extended list in an unpatched system that doesn't know

Re: [HACKERS] Win32 timezone matching

2010-04-06 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Apr 7, 2010 at 00:02, Tom Lane t...@sss.pgh.pa.us wrote: Oh, another thought here: what is the effect of the combination of this with your other proposal to add more timezones to the list? [ none ] Ah, right, I hadn't looked closely at the