pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: thibaut.madelaine@dalibo.com, Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15669: Error with unnest in PG 11 (ERROR: 0A000)
Date: Tue, 05 Mar 2019 17:59:59 -0500
Message-ID: <23541.1551826799@sss.pgh.pa.us> (raw)
In-Reply-To: <22437.1551824516@sss.pgh.pa.us>
References: <15669-02fb3296cca26203@postgresql.org>
	<19353.1551800347@sss.pgh.pa.us>
	<CAOBaU_YPJj95_9oskbobWxinOmfu3zJrNAnFD77yuzFTb6tmbA@mail.gmail.com>
	<21482.1551806937@sss.pgh.pa.us>
	<CAOBaU_ZE6+9YBL8htVC=hvV7Wv=Dd3i_Ze+NzW+ESuWpSsjoOw@mail.gmail.com>
	<20477.1551819776@sss.pgh.pa.us>
	<22437.1551824516@sss.pgh.pa.us>

I wrote:
> In v10 and later, not so much:

BTW, I forgot to clarify that in unpatched v11 and HEAD,
this test case appears to work, but that's only because
apply_scanjoin_target_to_paths is forgetting to install the
ProjectSetPath that should be there (and then, because the outer
query now realizes that the inner one is dummy, we don't construct
a plan with any SRF calls in it, and thus avoid getting the error
reported at the top of this thread).  With the patch discussed
so far, we get the same crummy plan as in v10.

I spent a little bit of time musing over whether we could avoid
inserting a ProjectSetPath at all, which would be nice because
then we'd not emit a useless ProjectSet plan node.  But that
seems like it'd require replacing the SRF call with something
else --- maybe a null constant of the right type --- and that
opens up a large can of worms in terms of getting setrefs.c
to not choke.  I'm doubtful that it's worth the work at all,
and I certainly wouldn't risk back-patching it.

			regards, tom lane




view thread (18+ messages)  latest in thread

Message-ID: <23541.1551826799@sss.pgh.pa.us>
Permalink:  ../23541.1551826799@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23541.1551826799@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, rjuju123@gmail.com, andres@anarazel.de, robertmhaas@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #15669: Error with unnest in PG 11 (ERROR: 0A000)
  In-Reply-To: <23541.1551826799@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