On Fri, Jul 9, 2021 at 12:42 PM Tom Lane <
tgl@sss.pgh.pa.us> wrote:
>
> John Naylor <
john.naylor@enterprisedb.com> writes:
> > The reproducer I shared stopped working at 7266d0997dd2a (Allow
> > functions-in-FROM to be pulled up if they reduce to constants). I'll dig
> > deeper a bit later unless someone beats me to it.
>
> Sounds like it's my fault then :-(. I'll look closer in a bit.
>
> regards, tom lane
If it saves you some time, the assert happens here in replace_vars_in_jointree():
case RTE_JOIN:
case RTE_CTE:
case RTE_NAMEDTUPLESTORE:
case RTE_RESULT:
/* these shouldn't be marked LATERAL */
Assert(false);
break;
where the plan has RTE_RESULT
--
John Naylor
EDB:
http://www.enterprisedb.com