On Tue, Jan 3, 2023 at 6:14 AM Joseph Koshakow <koshy44@gmail.com> wrote:
I have another patch, this one adds validations to operations that return intervals and updated error messages. I tried to give all of the error messages meaningful text, but I'm starting to think that almost all of them should just say "interval out of range". The current approach may reveal some implementation details and lead to confusion. For example, some subtractions are converted to additions which would lead to an error message about addition.
SELECT date 'infinity' - interval 'infinity'; ERROR: cannot add infinite values with opposite signs
I've also updated the commit message to include the remaining TODOs, which I've copied below
1. Various TODOs in code. 2. Correctly implement interval_part for infinite intervals. 3. Test consolidation. 4. Should we just use the months field to test for infinity?
3. Test consolidation.
I used the DO command, reduced a lot of test sql code.
I don't know how to generate an interval.out file.