Re: BUG #12046: lower_inf('(-infinity, today)'::tsrange) returns false

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: presnypreklad(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12046: lower_inf('(-infinity, today)'::tsrange) returns false
Date: 2014-11-24 18:57:11
Message-ID: 17169.1416855431@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

presnypreklad(at)gmail(dot)com writes:
> In the course of writing a program that accepts tsrange literals from the
> user, which are then plugged into various SQL queries, today I was testing
> some tsranges to see how they are interpreted by PostgreSQL 9.3.5.

> This one, in particular, behaves strangely: '(-infinity,today)'::tsrange

> The lower_inf function says the lower bound is not infinite (!)

This is not surprising: the range stuff has its own notion of "infinite
bounds", which has nothing to do with any infinity concept that the
underlying datatype may or may not have. Trying to unify those concepts
would greatly complicate the interface between ranges and their component
datatypes, without actually buying very much AFAICS.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message jkoceniak 2014-11-24 20:18:15 BUG #12050: Orphaned base files
Previous Message pmaseberg 2014-11-24 14:46:50 BUG #12048: Missing gdal packages for postgresql 9.4