-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CalendarDiffTime/SqlInterval objects with negative components do not work #603
Comments
Despite the title this issue is more or less unrelated to #601, which can still be closed if the suggested QoL change does not seem worth the effort. |
Looks like this got fixed in |
Hmm I'm now thinking patching Opaleye directly may be worthwhile given input-output-hk/haskell.nix#2234, those buggy time pre-1.14 iso8601 functions are going to stick around for quite some time and be annoying for many users to avoid, leading to Opaleye's |
Could you explain what needs to be done to fix this? |
So basically
Given the above I'd say to fix this so that users can easily use The changed code in
You can see that the |
Thanks for the detailed information. So if we make your proposed fix then the only difference is that some code that currently errors out will no longer error out but return the correct result? If so then I'm happy with that. I can put it in my priority queue of things to do. If you'd be willing to submit the relevant PR then that would probably get it done much quicker! |
The underlying cause is haskell/time#260 so if that is fixed then Opaleye may not have to do anything. I still bring it up here because it's a bit more subjective whether or not the issue in
time
is truly a bug (even though personally I think it's worth addressing there), due to the iso8601 standard potentially not supporting negative intervals.However in the context of Opaleye the end result is fairly objectively a bug, due to both
CalendarDiffTime
andSqlInterval
internally both fully supporting negative values, but serialization back and forth between them failing. So if the bug is labelled as a wontfix intime
(or just takes a while) then Opaleye using something other thantime
'siso8601...
functions seems like the right move.The text was updated successfully, but these errors were encountered: