David,
> But anyway, I still don’t understand why, if the function used to store the value is immutable (as upper_inf() is),
whyPostgres doesn't do an index scan. Is this something that could be improved in the planner?
Yes. This is clearly a TODO.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com