Re: When IMMUTABLE is not.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: When IMMUTABLE is not.
Date: 2023-06-15 13:21:38
Message-ID: 2111925.1686835298@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Drouvot, Bertrand 2023-06-15 13:21:50 Re: Support to define custom wait events for extensions
Previous Message Tomas Vondra 2023-06-15 13:19:47 Re: Memory leak in incremental sort re-scan