postgresql/src/backend
Tom Lane b14953932d Revise FDW planning API, again.
Further reflection shows that a single callback isn't very workable if we
desire to let FDWs generate multiple Paths, because that forces the FDW to
do all work necessary to generate a valid Plan node for each Path.  Instead
split the former PlanForeignScan API into three steps: GetForeignRelSize,
GetForeignPaths, GetForeignPlan.  We had already bit the bullet of breaking
the 9.1 FDW API for 9.2, so this shouldn't cause very much additional pain,
and it's substantially more flexible for complex FDWs.

Add an fdw_private field to RelOptInfo so that the new functions can save
state there rather than possibly having to recalculate information two or
three times.

In addition, we'd not thought through what would be needed to allow an FDW
to set up subexpressions of its choice for runtime execution.  We could
treat ForeignScan.fdw_private as an executable expression but that seems
likely to break existing FDWs unnecessarily (in particular, it would
restrict the set of node types allowable in fdw_private to those supported
by expression_tree_walker).  Instead, invent a separate field fdw_exprs
which will receive the postprocessing appropriate for expression trees.
(One field is enough since it can be a list of expressions; also, we assume
the corresponding expression state tree(s) will be held within fdw_state,
so we don't need to add anything to ForeignScanState.)

Per review of Hanada Shigeru's pgsql_fdw patch.  We may need to tweak this
further as we continue to work on that patch, but to me it feels a lot
closer to being right now.
2012-03-09 12:49:25 -05:00
..
access Update outdated comment. HeapTupleHeader.t_natts field doesn't exist anymore. 2012-03-09 08:07:56 +02:00
bootstrap Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
catalog Fix some issues with temp/transient tables in extension scripts. 2012-03-08 15:53:09 -05:00
commands Fix some issues with temp/transient tables in extension scripts. 2012-03-08 15:53:09 -05:00
executor Make EXPLAIN (BUFFERS) track blocks dirtied, as well as those written. 2012-02-22 20:33:05 -05:00
foreign Add GetForeignColumnOptions() to foreign.c, and add some documentation. 2012-03-07 18:20:58 -05:00
lib Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
libpq Remove useless cast 2012-02-26 15:31:16 +02:00
main Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
nodes Revise FDW planning API, again. 2012-03-09 12:49:25 -05:00
optimizer Revise FDW planning API, again. 2012-03-09 12:49:25 -05:00
parser Allow CREATE TABLE (LIKE ...) from composite type 2012-03-03 16:03:05 +02:00
po Translation updates 2011-08-17 14:07:46 +03:00
port Fix poll() implementation of WaitLatchOrSocket to notice postmaster death. 2012-01-15 22:08:03 +02:00
postmaster Avoid double close of file handle in syslogger on win32 2012-02-21 17:12:25 +01:00
regex Merge dissect() into cdissect() to remove a pile of near-duplicate code. 2012-02-24 18:40:31 -05:00
replication Minor bug fix and cleanup from self-review of sync rep queues patch. 2012-01-30 14:36:17 +00:00
rewrite Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
snowball Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
storage Correctly detect SSI conflicts of prepared transactions after crash. 2012-02-29 15:42:36 +02:00
tcop Run a portal's cleanup hook immediately when pushing it to FAILED state. 2012-02-15 16:19:01 -05:00
tsearch Collect and use element-frequency statistics for arrays. 2012-03-03 20:20:57 -05:00
utils Improve estimation of IN/NOT IN by assuming array elements are distinct. 2012-03-07 22:59:49 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Speed up in-memory tuplesorting. 2012-02-15 12:13:32 -05:00
common.mk Call check_keywords.pl in maintainer-check 2012-02-27 13:53:12 +02:00
nls.mk Sort file list when creating gettext-files 2011-12-27 20:20:56 +02:00