Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments - Mailing list pgsql-bugs

From Haribabu Kommi
Subject Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments
Date
Msg-id CAJrrPGdTdYuVthRFqRY3R+yWVg5twgrCyhokGQbGkJs1t8NM2g@mail.gmail.com
Whole thread Raw
In response to Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments  (John Pruitt <jpruitt@doozer.com>)
Responses Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments
List 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

Attachment

pgsql-bugs by date:

Previous
From: postgresql@zr40.nl
Date:
Subject: BUG #13674: psql: \i from a script run through \e misparses SQL as \i arguments
Next
From: Tom Lane
Date:
Subject: Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments