Re: Functions used by index don't need to be immutable? - Mailing list pgsql-bugs

From hubert depesz lubaczewski
Subject Re: Functions used by index don't need to be immutable?
Date
Msg-id aRMviSaBfPzTmMv5@depesz.com
Whole thread Raw
In response to Re: Functions used by index don't need to be immutable?  (Heikki Linnakangas <hlinnaka@iki.fi>)
List 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




pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Functions used by index don't need to be immutable?
Next
From: PG Bug reporting form
Date:
Subject: BUG #19110: the order of elements in a json object in database is different then the order of elements