You suggest to split timestamp types active/inactive-range to active/inactive-timerange, active/inactive-daterange?


On February 20, 2023 6:07:19 PM GMT+07:00, Ihor Radchenko <yantar92@posteo.net> wrote:
Ilya Chernyshov <ichernyshovvv@gmail.com> writes:

So, an option is needed that controls whether to return a
daterange
(even it's possible to return a timerange) or a timerange (if the
dates
in the range are equal).

I wrote a patch that handles this problem, could you please review
the
code and give some advice to improve it?

What about recording the type of timestamp range in the parser?
Then, interpreter can simply examine the range type and emit the correct
timestamp string.