+infinity for dates and timestamps
It has always annoyed me that we can't write '+infinity' for dates and
timestamps and get the OCD satisfaction of making our queries line up
with '-infinity'.
I wrote a fix for that some time ago but apparently never posted it. I
was reminded of it by jian he in the Infinite Interval thread, and so
here it is.
--
Vik Fearing
Attachments:
plus_infinity.difftext/x-patch; charset=UTF-8; name=plus_infinity.diffDownload+9-2
On 1/1/23 03:10, Vik Fearing wrote:
It has always annoyed me that we can't write '+infinity' for dates and
timestamps and get the OCD satisfaction of making our queries line up
with '-infinity'.I wrote a fix for that some time ago but apparently never posted it. I
was reminded of it by jian he in the Infinite Interval thread, and so
here it is.
Hmm. Somehow the .out test files were not included.
Fixed with attached.
--
Vik Fearing
Attachments:
plus_infinity.v2.difftext/x-patch; charset=UTF-8; name=plus_infinity.v2.diffDownload+37-4
Vik Fearing <vik@postgresfriends.org> writes:
It has always annoyed me that we can't write '+infinity' for dates and
timestamps and get the OCD satisfaction of making our queries line up
with '-infinity'.
+1, since it works for numerics it should work for these types too.
(I didn't read the patch though.)
regards, tom lane
Vik Fearing <vik@postgresfriends.org> writes:
Hmm. Somehow the .out test files were not included.
Fixed with attached.
Somehow you'd managed to duplicate some of the other changes,
so the cfbot still didn't like that :-(
Anyway, pushed with cosmetic changes. Notably, I left out the
documentation changes after observing that we don't document
"+infinity" separately for the numeric types. Given the lack of
complaints about that I think it's fine to do the same here.
regards, tom lane
On 1/1/23 20:21, Tom Lane wrote:
Vik Fearing <vik@postgresfriends.org> writes:
Hmm. Somehow the .out test files were not included.
Fixed with attached.Somehow you'd managed to duplicate some of the other changes,
so the cfbot still didn't like that :-(Anyway, pushed with cosmetic changes. Notably, I left out the
documentation changes after observing that we don't document
"+infinity" separately for the numeric types. Given the lack of
complaints about that I think it's fine to do the same here.
Thanks, Tom! No objections to your changes.
--
Vik Fearing