Re: interval_scale not work as expected?

2023-10-15 Thread Tom Lane
jian he writes: > I thought: > SELECT pg_catalog.interval('1 day 01:23:45.6789'::interval, 0) > is same as > SELECT interval(0) '1 day 01:23:45.6789' [ shrug ] No, it isn't. Interval typmods have to carry a lot more than just the fractional precision, because of all the weird syntactic baggage

interval_scale not work as expected?

2023-10-15 Thread jian he
Hi. ( SELECT interval(0) '1 day 01:23:45.6789' union all SELECT interval(1) '1 day 01:23:45.6789' union all SELECT interval(2) '1 day 01:23:45.6789' union all SELECT interval(3) '1 day 01:23:45.6789' union all SELECT inter