Re: BUG #17371: Immutable INTERVAL to TEXT cast can cause incorrect query results

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17371: Immutable INTERVAL to TEXT cast can cause incorrect query results
Дата
Msg-id 733296.1642628564@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17371: Immutable INTERVAL to TEXT cast can cause incorrect query results  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17371: Immutable INTERVAL to TEXT cast can cause incorrect query results
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17372: Altering statistics during concurrent drop can lead to a server crash