Re: ERROR: could not devise a query plan for the given query (UNIONS and LATERAL) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: ERROR: could not devise a query plan for the given query (UNIONS and LATERAL)
Date
Msg-id 26533.1516738777@sss.pgh.pa.us
Whole thread Raw
In response to ERROR: could not devise a query plan for the given query (UNIONS and LATERAL)  (Elvis Pranskevichus <elprans@gmail.com>)
List pgsql-bugs
Elvis Pranskevichus <elprans@gmail.com> writes:
> The following (admittedly bizzare) query causes the error in the subject 
> on all recent versions of Postgres:

Interesting.  What this shows is that reparameterize_path has to be able
to work on an AppendPath, because if you've got nested appendrels that's
the only sort of path there will be for that particular child of the
outer appendrel.

I'm a little worried about whether this doesn't mean that
reparameterize_path needs to be able to work on any kind of path.
However, given that it's been there quite some time without previous
reports of trouble, jumping to that conclusion may be premature.

I'm also wondering where reparameterize_path_by_child came from and
why it's so enormously more ambitious than reparameterize_path
in terms of its path-type coverage.

            regards, tom lane


pgsql-bugs by date:

Previous
From: Elvis Pranskevichus
Date:
Subject: ERROR: could not devise a query plan for the given query (UNIONS and LATERAL)
Next
From: Sergei Kornilov
Date:
Subject: Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.