Re: BUG #17227: segmentation fault with jsonb_to_recordset - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17227: segmentation fault with jsonb_to_recordset
Date
Msg-id 676464.1634158492@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17227: segmentation fault with jsonb_to_recordset  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #17227: segmentation fault with jsonb_to_recordset
List 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@sss.pgh.pa.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



pgsql-bugs by date:

Previous
From: "Efrain J. Berdecia"
Date:
Subject: Re: BUG #17229: Segmentation Fault after upgrading to version 13
Next
From: Tom Lane
Date:
Subject: Re: BUG #17227: segmentation fault with jsonb_to_recordset