On Fri, 20 Mar 2026 at 01:56, David Rowley <[email protected]> wrote: > > On Fri, 20 Mar 2026, 01:39 Tender Wang, <[email protected]> wrote: >> 1197 pg_assume(attlen > 0 || attlen == -1); >> (gdb) p attlen >> $1 = -2 > > > Thanks for the report. I'll look in detail in the morning when I'm at my > computer again. I guess i'll need to add an extra parameter (that will be > constant folded away during the inlining) to the deformed function to specify > if cstrings can exist in the tuple, which seemingly needs to be true when > deforming minimal tuples. I'd rather not lose that optimisation with heap > tuples.
I've pushed a fix for this. A more simple recreator was: with cte as materialized (select relname::cstring as relname from pg_class) select relname from cte; David
