Re: [Internet] Re: 回复:Re: [PATCH] Pr event replacement of a function if it's used in an index expression and is not IMMUTABLE

Started by David G. Johnston6 months ago1 messages
#1David G. Johnston
david.g.johnston@gmail.com

On Wednesday, July 9, 2025, sundayjiang(蒋浩天) <sundayjiang@tencent.com>
wrote:

- When creating a function, if it is declared as IMMUTABLE but
directly calls a non-IMMUTABLE function, the creation should be rejected.

This patch is not going to be accepted in core. In short, your desire to
have the server enforce this is too late. We don’t get to change our
policy.

The alter function + index is at least reasonable since it affects a
dump-restore scenario; but was deemed too expensive for the benefit.
Arguably we should just get rid of the immutability check for create index
since our enforcement of it has so many holes.

David J.