On Wed, Apr 1, 2026 at 1:13 PM Junwang Zhao <zhjwpku@gmail.com> wrote:
>
> The parser transforms '' (or any cstring) into Const with UNKNOWNOID.
> When building the tuple descriptor in ExecTypeFromExprList,
> TupleDescInitEntry uses UNKNOWNOID to populate the attribute entry,
> thus the failure in nocachegetattr.
>
> Therefore, the assertion should be addressed by removing the pg_assume,
> since this case can occur.
>
> Just trying to learn through analysis, might be incorrect. Let's wait for
> David's fix.
>
HI.
You can also trigger it via:
SELECT row_to_json(('', ''));
In transformRowExpr, we can coerce these UNKNOWNOID Const to TEXTOID Const.
But I guess it's harder to guarantee that comment "cstrings don't
exist in heap tuples." in nocachegetattr to be true.
--
jian
https://www.enterprisedb.com/