Re: BUG #17240: at time zone ... ; wrong result

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17240: at time zone ... ; wrong result
Дата
Msg-id 4046745.1635179154@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17240: at time zone ... ; wrong result  (Marek Läll <lall.marek@gmail.com>)
Ответы Re: BUG #17240: at time zone ... ; wrong result  (Marek Läll <lall.marek@gmail.com>)
Список pgsql-bugs
=?UTF-8?Q?Marek_L=C3=A4ll?= <lall.marek@gmail.com> writes:
> POSIX string (syntax) is defined as:
>  --> stdoffset[dst[offset][,start-date[/time],end-date[/time]]]

> The std string specifies the name of the time zone.
> It must be three or more characters long and must not contain a leading
> colon, embedded digits, commas, nor plus and minus signs.

Hmm, you're reading the POSIX spec I guess, because our docs don't
say that ;-).  The IANA tzdb code only enforces that STD not be empty,
and Postgres has modified it to allow empty STD as well.  That's
an ancient backwards-compatibility decision that we likely ought
to change sometime, so I've intentionally not documented it in
appendix B.5 [1].  The text in B.5 actually says that you need angle
brackets if you want any non-letters in STD or DST, which is more
conservative than what the IANA code will accept.

> 2) then: ignores the fact that string '-07:00' is invalid POSIX value

It's valid according to our interpretation of POSIX.  Some experimentation
suggests that GNU date(1) enforces the POSIX definition exactly, which is
that STD be at least three characters, all alphabetic.  That implies that
they wrote their own TZ parser, because the IANA reference code doesn't
act that way.

            regards, tom lane

[1] https://www.postgresql.org/docs/current/datetime-posix-timezone-specs.html



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: ERROR: posting list tuple with 20 items cannot be split at offset 168
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: BUG #17245: Index corruption involving deduplicated entries