Re: BUG #17227: segmentation fault with jsonb_to_recordset

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: bernddorn(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17227: segmentation fault with jsonb_to_recordset
Date: 2021-10-13 20:54:52
Message-ID: 676464.1634158492@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> This works OK in v12, so somebody broke it between v12 and v13.

Looks like the somebody was me. git bisect pins the blame on

commit 7266d0997dd2a0632da38a594c78e25ff21df67e
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Date: Thu Aug 1 18:50:22 2019 -0400

Allow functions-in-FROM to be pulled up if they reduce to constants.

A relevant-looking part of the commit message is

To do this, we need to rearrange when eval_const_expressions()
happens for expressions in function RTEs. I moved it to
inline_set_returning_functions(), which already has to iterate over
every function RTE, and in consequence renamed that function to
preprocess_function_rtes().

Apparently this idea failed to account for subexpressions pulled up
during later processing. Back to the drawing board.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2021-10-13 21:09:48 Re: BUG #17212: pg_amcheck fails on checking temporary relations
Previous Message Efrain J. Berdecia 2021-10-13 20:53:03 Re: BUG #17229: Segmentation Fault after upgrading to version 13