that totally answers my question. Part of me hoped Postgres could optimize an EXTRACT expression, perhaps even transform it to combinations of <= and >=. Sounds like an opportunity to contribute :)
↧