Allow callers of create_foreignscan_path to specify nondefault PathTarget.
commit28048cbaa285b8ac46940e4b39f985d9885fc698
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 14 Mar 2016 21:31:28 +0000 (14 17:31 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 14 Mar 2016 21:31:28 +0000 (14 17:31 -0400)
tree419821d979318f9474d05d52b619fba5ad568d32
parent307c78852f516042cebacaed411a0391bfeb2129
Allow callers of create_foreignscan_path to specify nondefault PathTarget.

Although the default choice of rel->reltarget should typically be
sufficient for scan or join paths, it's not at all sufficient for the
purposes PathTargets were invented for; in particular not for
upper-relation Paths.  So break API compatibility by adding a PathTarget
argument to create_foreignscan_path().  To ease updating of existing
code, accept a NULL value of the argument as selecting rel->reltarget.
contrib/file_fdw/file_fdw.c
contrib/postgres_fdw/postgres_fdw.c
src/backend/optimizer/util/pathnode.c
src/include/optimizer/pathnode.h