Redesign PlanForeignScan API to allow multiple paths for a foreign table.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 5 Mar 2012 21:15:59 +0000 (16:15 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 5 Mar 2012 21:15:59 +0000 (16:15 -0500)
commit6b289942bfdbbfa2955cedc591c522822a7ffbfe
tree6205261ee347d578153391cec4dbd99e55e1a6bd
parent3f47e145f1869f147a807e5a2cb80d21a13e10ae
Redesign PlanForeignScan API to allow multiple paths for a foreign table.

The original API specification only allowed an FDW to create a single
access path, which doesn't seem like a terribly good idea in hindsight.
Instead, move the responsibility for building the Path node and calling
add_path() into the FDW's PlanForeignScan function.  Now, it can do that
more than once if appropriate.  There is no longer any need for the
transient FdwPlan struct, so get rid of that.

Etsuro Fujita, Shigeru Hanada, Tom Lane
12 files changed:
contrib/file_fdw/file_fdw.c
doc/src/sgml/fdwhandler.sgml
src/backend/nodes/copyfuncs.c
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/util/pathnode.c
src/include/foreign/fdwapi.h
src/include/nodes/nodes.h
src/include/nodes/plannodes.h
src/include/nodes/relation.h
src/include/optimizer/pathnode.h