Subject: Re: When IMMUTABLE is not.

From: Tom Lane <[email-masked]>
Date: Thu, 15 Jun 2023 09:21:38 -0400

Yura Sokolov <[email-masked]> writes:
> I found, than declaration of function as IMMUTABLE/STABLE is not enough to be sure
> function doesn't manipulate data.

Of course not.  It is the user's responsibility to mark functions
properly.  Trying to enforce that completely is a fool's errand;
you soon get into trying to solve the halting problem.

I don't like anything about the proposed patch.  It's necessarily
only a partial solution, and it probably breaks cases that are
perfectly safe in context.

			regards, tom lane