postgres_fdw: Fix the fix for crash when pushing down multiple joins.
authorRobert Haas <rhaas@postgresql.org>
Mon, 16 May 2016 15:28:28 +0000 (11:28 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 16 May 2016 15:28:28 +0000 (11:28 -0400)
commit02a568a02769ca626591039f460109369bf05dc2
treef3b560b517ee8c738f65bd07915cd55c801ddce5
parent1b812afb0eafe125b820cc3b95e7ca03821aa675
postgres_fdw: Fix the fix for crash when pushing down multiple joins.

Commit 3151f16e1874db82ed85a005dac15368903ca9fb was intended to be
a commit of a patch from Ashutosh Bapat, but instead I mistakenly
committed an earlier version from Michael Paquier (because both
patches were submitted with the same filename, and I confused them).
Michael's patch fixes the crash but doesn't actually implement the
correct test.

Repair the incorrect logic, and also expand the comments considerably
so that this is all more clear.

Ashutosh Bapat and Robert Haas
contrib/postgres_fdw/expected/postgres_fdw.out
contrib/postgres_fdw/postgres_fdw.c
contrib/postgres_fdw/sql/postgres_fdw.sql