postgresql/contrib/postgres_fdw
Peter Eisentraut 332bec1e60 postgres_fdw: Fix join push down with extensions
Objects in an extension are shippable to a foreign server if the
extension is part of the foreign server definition's shippable
extensions list.  But this was not properly considered in some cases
when checking whether a join condition can be pushed to a foreign server
and the join condition uses an object from a shippable extension.  So
the join would never be pushed down in those cases.

So, the list of extensions needs to be made available in fpinfo of the
relation being considered to be pushed down before any expressions are
assessed for being shippable.  Fix foreign_join_ok() to do that for a
join relation.

The code to save FDW options in fpinfo is scattered at multiple places.
Bring all of that together into functions apply_server_options(),
apply_table_options(), and merge_fdw_options().

David Rowley and Ashutosh Bapat, per report from David Rowley
2017-04-24 22:50:07 -04:00
..
expected postgres_fdw: Fix join push down with extensions 2017-04-24 22:50:07 -04:00
sql postgres_fdw: Fix join push down with extensions 2017-04-24 22:50:07 -04:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
Makefile Allow postgres_fdw to ship extension funcs/operators for remote execution. 2015-11-03 18:42:18 -05:00
connection.c chomp PQerrorMessage() in backend uses 2017-02-27 08:54:51 -05:00
deparse.c Handle restriction clause lists more uniformly in postgres_fdw. 2017-04-11 11:59:09 -04:00
option.c Move some things from builtins.h to new header files 2017-01-20 20:29:53 -05:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c postgres_fdw: Fix join push down with extensions 2017-04-24 22:50:07 -04:00
postgres_fdw.control Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.h Simplify handling of remote-qual pass-forward in postgres_fdw. 2017-04-11 13:53:21 -04:00
shippable.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00