Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments
Дата
Msg-id CAJrrPGdTdYuVthRFqRY3R+yWVg5twgrCyhokGQbGkJs1t8NM2g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments  (John Pruitt <jpruitt@doozer.com>)
Ответы Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Tue, Oct 13, 2015 at 1:50 AM, John Pruitt <jpruitt@doozer.com> wrote:
> Okay, I'll acknowledge that the issue has been discussed before, however I
> fail to see how the issue can be considered resolved. The function takes
> time zone aware arguments, ignores that input, and returns plainly incorrect
> answers - the very definition of a bug.

I also feel like that it is a bug. Here I attached a patch that
corrects the problem.
The patch just adds the difference in DST to the hours of difference
between the two
timestamp. The drawback in this approach is that, it produces the result as
24:00:00 instead of 1 day.

Any better approach to handle this problem?

Regards,
Hari Babu
Fujitsu Australia

Вложения

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

Предыдущее
От: postgresql@zr40.nl
Дата:
Сообщение: BUG #13674: psql: \i from a script run through \e misparses SQL as \i arguments
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments