Re: BUG #17097: FailedAssertion at initsplan.c - Mailing list pgsql-bugs

From John Naylor
Subject Re: BUG #17097: FailedAssertion at initsplan.c
Date
Msg-id CAFBsxsGKi_+kRMLy5QZk=+D0FJW91tO_UsXkcDfzwoaGYq8XKA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17097: FailedAssertion at initsplan.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #17097: FailedAssertion at initsplan.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs


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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17097: FailedAssertion at initsplan.c
Next
From: Tom Lane
Date:
Subject: Re: BUG #17097: FailedAssertion at initsplan.c