Re: BUG #17366: Error result returned in timestamp2timestamptz, expected to be off by one hour

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17366: Error result returned in timestamp2timestamptz, expected to be off by one hour
Дата
Msg-id 3379884.1642173892@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17366: Error result returned in timestamp2timestamptz, expected to be off by one hour  (Francisco Olarte <folarte@peoplecall.com>)
Список pgsql-bugs
Francisco Olarte <folarte@peoplecall.com> writes:
> On Fri, 14 Jan 2022 at 11:15, PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> postgres=# set timezone to "PST8PDT";
>> ..
>> postgres=# select (timestamp '2021-03-14 02:00:00')::timestamptz;
>> 2021-03-14 03:00:00-07
>> postgres=# select (timestamp '2021-03-14 03:00:00')::timestamptz;
>> 2021-03-14 03:00:00-07

> You are playing around the DST changes, and timestamp must have unique
> representations, for informal descriptions "time jumps from 2 to 3" is
> fine, when dealing with real data you must decide if it jumps just
> before or just after, it seems your expectations are wrong:

Yeah.  See

https://www.postgresql.org/docs/devel/datetime-invalid-input.html

(I'm pointing you to the devel version of that page because it
contains a correction that hasn't yet propagated into the other
versions)

            regards, tom lane



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

Предыдущее
От: Francisco Olarte
Дата:
Сообщение: Re: BUG #17366: Error result returned in timestamp2timestamptz, expected to be off by one hour
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: BUG #17255: Server crashes in index_delete_sort_cmp() due to race condition with vacuum