PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> I believe casts from INTERVAL to TEXT (and other string-like types such as
> CHAR, NAME, VARCHAR, and "char") should have a volatility of stable, not
> immutable, because the results of these casts depend on IntervalStyle.
Ugh, right, interval_out is marked immutable and should not be.
The cost/benefit of trying to change this in released branches doesn't
seem attractive, but we can fix it for v15 and up.
(Oddly, interval_in is already correctly marked as STABLE. I'm not
sure how it got to be that way with nobody noticing the mistake
for interval_out.)
Thanks for the report!
regards, tom lane