Re: Effecient time ranges in 9.4/9.5?

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Effecient time ranges in 9.4/9.5?
Date: 2015-10-12 17:14:10
Message-ID: 561BEA62.4060303@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/4/15 6:18 AM, Karsten Hilbert wrote:
> check whether both TZs are equal,
> if so
> ignore them
> else
> convert both operands to UTC,
> do "time - time",
> return result AT TIME ZONE UTC,
> document that UTC is returned,
>
> such that the user can know to apply "AT TIME ZONE ..."
> to the result as needed.

The problem there is you can't reliably convert a time to a different
timezone without knowing what date you're talking about.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2015-10-12 17:43:15 Re: Effecient time ranges in 9.4/9.5?
Previous Message Jim Nasby 2015-10-12 17:08:22 Re: Constraint allowing value up to 2 times but no more than 2 times