I'm using range datatypes in PG 9.3 (with btree_gist enabled, though I don't think it matters). I have GIST indexes that include these range columns. Some are int8range and some are tsrange.
I want to query with a WHERE expression essentially saying "range is NULL (unbounded) on the right side". How do I write that?
For tsrange, I can do "tsrange @> timestamp 'infinity'". But there's no equivalent for int8range. And I assume the way to do this properly for int8range should be the way for tsrange as well (not relying on timestamp-specific treatment of 'infinity').
The expression should be usable for GIST indexes (i.e. falls into the default operator class for these range types).
Help?