pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: bernddorn@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17227: segmentation fault with jsonb_to_recordset
Date: Wed, 13 Oct 2021 16:54:52 -0400
Message-ID: <676464.1634158492@sss.pgh.pa.us> (raw)
In-Reply-To: <675396.1634157283@sss.pgh.pa.us>
References: <202110131359.a6m35hpudkg7@alvherre.pgsql>
	<649678.1634135335@sss.pgh.pa.us>
	<675396.1634157283@sss.pgh.pa.us>

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





view thread (7+ messages)  latest in thread

Message-ID: <676464.1634158492@sss.pgh.pa.us>
Permalink:  ../676464.1634158492@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/676464.1634158492@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, bernddorn@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17227: segmentation fault with jsonb_to_recordset
  In-Reply-To: <676464.1634158492@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox