I wrote:
> You could try constructing a GIST or SPGIST index on the ranges
> tstzrange(s, e), where you'd have to do something to convert null
> endpoints to infinities, and then probing with WHERE rangeexpr @> now().
Or actually, it looks like tstzrange() already does the right thing:
regression=# select tstzrange(now(), null);
tstzrange
-----------------------------------
["2016-09-29 09:12:14.79429-04",)
(1 row)
regression=# select tstzrange(null, now());
tstzrange
------------------------------------
(,"2016-09-29 09:12:33.632327-04")
(1 row)
So this just reduces to WHERE tstzrange(s, e) @> now().
regards, tom lane