Search Postgresql Archives

Re: Interesting case of IMMUTABLE significantly hurting performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 09, 2025 at 10:50:00PM +0200, Laurenz Albe wrote:
> The IMMUTABLE function cannot be inlined because to_char() is not IMMUTABLE.

Q: Why would to_char() not be IMMUTABLE?

A: Because it makes use of locales, and I guess the guc-timezone GUC,
   which could change if the expression is ultimately used in a PlPgSQL
   fragment, or if it's in a prepared statement.  (I think.)

That to_char is not immutable is not documented though.  Though it's
clear when looking at the docs for the `jsonb_.*_tz()` functions.

Nico
-- 





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux