Re: Simplifying timezone support

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Simplifying timezone support
Дата
Msg-id 20825.1045869331@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Simplifying timezone support  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Simplifying timezone support  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Re: Simplifying timezone support  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Список pgsql-hackers
"Ross J. Reedstrom" <reedstrm@rice.edu> writes:
> If the time zone came back UNKOWN, we go ahead and see if tzset() can
> interpret it. Criteria for failure: if the timezone offset came back 0,
> and the reported tzname[0] is the same as the string that we passed in. If
> it does, we fire a NOTICE about an unknown spelling of GMT. Note that we
> would have already caught all _known_ spellings of GMT in the first step,
> so we won't be spamming the DBA with warnings about 'GMT' and 'UTC', etc.

I'm worried about cases like "Africa/Benin" for places that just happen
to be on the prime meridian, but don't call their time GMT or UTC.
Looking at a globe, it also seems possible that there are places an hour
west of Greenwich, for which this could fail during daylight-savings
season.

> An extension to this would be to use the tzset() trick above directly
> in the datetime constant parser, as a fallback after not matching the
> table. In that case, we'd probably want to treat the unknown spelling
> of GMT as an error, though (as it currently does).

I think tzset() is probably much too slow to consider calling on every
pass through timestamptz_in ...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: Simplifying timezone support
Следующее
От: Peter Eisentraut
Дата:
Сообщение: ILIKE