回答simple question时,有人问我如何将2 days 31:09:34“转换”为3 days 07:09:34。我想不出比再多一次时差更难看的了,就像这样:
t=# with a as (
select cast('2 days 31:09:34.607843' as interval) i
)
select i, now() +i -now() wheel,i+interval '1 minute'
from a;
i | wheel | ?column?
------------------------+------------------------+------------------------
2 days 31:09:34.607843 | 3 days 07:09:34.607843 | 2 days 31:10:34.607843
(1 row)时间: 0.232毫秒
请告诉我把'25 hours'::interval翻译成'1 day 1 hour'::interval的正确方法
https://stackoverflow.com/questions/41247289
复制相似问题