Re: tstzrange with ... 'infinity'] + upper_inf() using 9.2.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ralph Graulich <maillist(at)shauny(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tstzrange with ... 'infinity'] + upper_inf() using 9.2.4
Date: 2013-05-01 22:41:40
Message-ID: 5818.1367448100@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ralph Graulich <maillist(at)shauny(dot)de> writes:
> select upper_inf(tsrange('2013-05-01'::timestamp, 'infinity'::timestamp, '[]'));
> upper_inf
> -----------
> f
> (1 row)

> As far as I understood the docs, this query should return true, as the upper bound includes 'infinity'?

No, that's the point of the sentence about the range mechanisms not
understanding special values of the underlying type. upper_inf tests
for a range with no upper bound, period. It would need some
type-specific special knowledge to do what you're hoping for, and it
has not got that.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-05-01 22:45:22 Re: LONG delete with LOTS of FK's
Previous Message Ralph Graulich 2013-05-01 21:53:22 tstzrange with ... 'infinity'] + upper_inf() using 9.2.4