Closed brianpursley closed 4 months ago
Wow, this is a nicely written ticket! Thanks for the detailed repro cases and explanation of expected behavior. You're right, this is an oversight on my part and I'll need to rewrite a little of this to correct the behavior. I'll update here once I have.
date_bin_table()
always treats the time range as an inclusive range[]
, even if you specify exclusive boundaries()
.It looks like this is because it uses
lower()
andupper()
to extract the range bounds and then uses them with a between operator, instead of the tstzrange containment operator.My setup and test below:
For the output of the final query, I was expecting to see this: