From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: postgres_fdw: Don't push down certain full joins.
Date: Thu, 21 Apr 2016 03:54:30 +0000
Message-ID: <E1at5hG-0000qF-Nd@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
postgres_fdw: Don't push down certain full joins.
If there's a filter condition on either side of a full outer join,
it is neither correct to attach it to the join's ON clause nor to
throw it into the toplevel WHERE clause. Just don't push down the
join in that case.
To maximize the number of cases where we can still push down full
joins, push inner join conditions into the ON clause at the first
opportunity rather than postponing them to the top-level WHERE
clause. This produces nicer SQL, anyway.
This bug was introduced in e4106b2528727c4b48639c0e12bf2f70a766b910.
Ashutosh Bapat, per report from Rajkumar Raghuwanshi.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/5b1f9ce1d9e8dcae2bcd93b2becffaba5e4f3049
Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 166 +++++++++++++++++--------
contrib/postgres_fdw/postgres_fdw.c | 108 +++++++++-------
contrib/postgres_fdw/sql/postgres_fdw.sql | 8 ++
3 files changed, 184 insertions(+), 98 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org
Subject: Re: pgsql: postgres_fdw: Don't push down certain full joins.
In-Reply-To: <E1at5hG-0000qF-Nd@gemulon.postgresql.org>
References: <E1at5hG-0000qF-Nd@gemulon.postgresql.org>
* 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