Alvaro Herrera <[EMAIL PROTECTED]> writes:
> On Sat, Jul 10, 2004 at 12:40:21PM -0400, Tom Lane wrote:
>> Perhaps, rather than just probing a few selected years, we had better
>> check every year since 1970 ...

> What if we tell the user what the detected timezone is at some point,
> and tell them that it's only a heuristic?  So if somebody gets a wrong
> timezone, they can select the correct one in postgresql.conf.

That's the ultimate fallback in any case.  But it would be nice if it
"just worked" in as many cases as possible.  (Or should I revert the
hack that made it work for *your* timezone? ;-))

I was initially thinking that probing a large number of test times
would be expensive, but on second thought I don't see that it would
be a problem.  On nearly all the entries in the TZ database, we'd
reject on the first or second probe time anyway; only very near
matches such as in Chris' example would need multiple checks.  We
could probably check every Sunday from 1970-1-1 to current time
without making any visible difference in the speed of postmaster
launch ... and I think we might *have* to do that, if there are any
cases where similar zones differ only in the specific dates of
DST start/end.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to