On 08/20/2017 10:23 AM, Fennell, Felix W. wrote:
> Hi,
>
> Apologies if this isn’t the right place to ask questions like this but I am having difficulty storing ‘infinite’
datesusing the DateTimeTZRange object.
>
> I have a Postgres database with a ‘tstzrange’ column (named validity) and I’d like to store a value in this similar
to‘[“2010-01-01 10:00:00 +01”, infinity]’.
While it is not an error to use 'infinity' or '-infinity' in a
tstzrange, since those are acceptable timestamptz values, that is not
the normal way to represent a range which extends infinitely in one
direction. The normal way to represent a range with an infinite upper or
lower bound is to omit the bound, as in '["2010-01-01 10:00:00 +01",]'.
Read the manual for more detail:
https://www.postgresql.org/docs/current/static/rangetypes.html#RANGETYPES-INFINITE
--
Jonathan Rogers
Socialserve.com by Emphasys Software
jrogers@emphasys-software.com