I wrote:
> Anybody have an idea about how to silence it more effectively?
> There are going to be more people seeing this as gcc 15 propagates.

Meh.  I tried this:

diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index bb99781c56e..ea489db89c9 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -8794,6 +8794,7 @@ assign_simple_var(PLpgSQL_execstate *estate, PLpgSQL_var 
*var,
         * not a problem since all array entries are always detoasted.)
         */
        if (!estate->atomic && !isnull && var->datatype->typlen == -1 &&
+           DatumGetPointer(newvalue) != NULL &&
            VARATT_IS_EXTERNAL_NON_EXPANDED(DatumGetPointer(newvalue)))
        {
            MemoryContext oldcxt;

and was rewarded with *two* copies of the warning.  So that makes it
smell more like a compiler bug than anything else.  (I now vaguely
recall Andres opining that that's what it was on serinus, though
I can't find any such email.)

                        regards, tom lane


Reply via email to