Re: Functions used by index don't need to be immutable?
hubert depesz lubaczewski <depesz@depesz.com>
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2025-11-11T12:43:53Z
Lists: pgsql-bugs
On Tue, Nov 11, 2025 at 02:43:18PM +0200, Heikki Linnakangas wrote: > In case of SQL functions, the immutability check can inline or "see through" > the definition and determine that the expression used in the function > doesn't contain any immutable expressions. If you modify get_tsvector, > adding a random() to it for example, then you will get the error. Ah, makes sense. Thanks a lot. Best regards, depesz