Postgres range types natively collapse to empty when both the lower and upper boundaries are of identical value. While this is semantically correct, it leads to losing any boundary information. We should prevent this by making sure our custom drizzle range type(s) implement toDriver methods that coalesce collapsing ranges to an asymmetrically bounded ([...) or (...]) range that will automatically increment or decrement one of the bounds to ensure a range of at least one-unit in size.
List of actions
[x] Determine pitfalls or alternatives for proposed solutions
Task Description
Postgres range types natively collapse to
empty
when both the lower and upper boundaries are of identical value. While this is semantically correct, it leads to losing any boundary information. We should prevent this by making sure our custom drizzle range type(s) implementtoDriver
methods that coalesce collapsing ranges to an asymmetrically bounded ([...)
or(...]
) range that will automatically increment or decrement one of the bounds to ensure a range of at least one-unit in size.List of actions