Wishlist: Add BETWEEN SYMMETRIC feature to reporter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Wishlist
|
Unassigned | ||
3.2 |
Won't Fix
|
Wishlist
|
Unassigned | ||
3.3 |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
One of the most common reports mistakes is that the end user will unwittingly enter the higher value first in a "between" filter, which results in an empty result set, since PostgreSQL accepts those values literally (example, there will be no circulations with a circ date between '2019-10-01' and '2019-09-01'). PostgreSQL offers BETWEEN SYMMETRIC as a solution to this. From the docs:
"BETWEEN SYMMETRIC is like BETWEEN except there is no requirement that the argument to the left of AND be less than or equal to the argument on the right. If it is not, those two arguments are automatically swapped, so that a nonempty range is always implied."
(from https:/
I suggest we alter the SQL builder code to make any "between" or "not between" become "BETWEEN SYMMETRIC" or "NOT BETWEEN SYMMETRIC" in the resulting query. I'm unable to think of a use case where any end user of the Evergreen reporter would want it any other way.
Changed in evergreen: | |
importance: | Undecided → Wishlist |
Changed in evergreen: | |
milestone: | 3.4.1 → 3.4.2 |
Changed in evergreen: | |
milestone: | 3.4.2 → 3.4.3 |
milestone: | 3.4.3 → 3.5-alpha |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Noting that BETWEEN SYMMETRIC is available in all Pg versions required by supported versions of Evergreen. I would not be averse to classifying this as a backport-able usability bug.