Re: Inconsistent Parsing of Offsets with Seconds

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inconsistent Parsing of Offsets with Seconds
Дата
Msg-id 788148.1719076559@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Inconsistent Parsing of Offsets with Seconds  ("David E. Wheeler" <david@justatheory.com>)
Ответы Re: Inconsistent Parsing of Offsets with Seconds
Список pgsql-hackers
"David E. Wheeler" <david@justatheory.com> writes:
> The treatment of timestamptz (and timetz) values with offsets that include seconds seems a bit inconsistent.

It's hard to get excited about this.  Per the IANA TZ data,
nowhere in the world has used fractional-minute UT offsets
since 1972:

# In 1972 Liberia was the last country to switch from a UT offset
# that was not a multiple of 15 or 20 minutes.

and they were twenty years later than the next-to-last place (although
IANA will steadfastly deny reliability for their TZ data before 1970).
So timestamps like this simply don't exist in the wild.

> The corresponding jsonpath methods don’t like offsets with seconds *at all*:

Perhaps that should be fixed, but it's pretty low-priority IMO.
I doubt there is any standard saying that JSON timestamps need
to be able to include that.

> I see from the source[1] that offsets between plus or minus 15:59:59
> are allowed; should the `OF` and `TZ formats be able to parse them?

I'd vote no.  to_date/to_char already have enough trouble with format
strings being squishier than one might expect.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Meson far from ready on Windows
Следующее
От: walther@technowledgy.de
Дата:
Сообщение: Re: Meson far from ready on Windows