pg-mem
pg-mem copied to clipboard
Subtracting interval from dates gives the wrong output.
Describe the bug
Subtracting dates with intervals seems to give the wrong output. for example, subtracting one year from 2022-01-01
returns 2021-01-06
. But in postgres it produces the expected 2021-01-01
.
To Reproduce
SELECT '2022-01-01'::date - interval '1 year';
SELECT '2022-01-01'::date - interval '1 month';
pg-mem version
Used playground