Skip site navigation (1) Skip section navigation (2)

pgsql: Redesign PlanForeignScan API to allow multiple paths for aforei

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Redesign PlanForeignScan API to allow multiple paths for aforei
Date: 2012-03-05 21:16:14
Message-ID: E1S4fGQ-00010V-6M@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6b289942bfdbbfa2955cedc591c522822a7ffbfe

Modified Files
--------------
contrib/file_fdw/file_fdw.c             |   39 +++++++++++++++++++++++-------
doc/src/sgml/fdwhandler.sgml            |   33 ++++++++++++++++---------
src/backend/nodes/copyfuncs.c           |   21 +--------------
src/backend/nodes/outfuncs.c            |   19 +++-----------
src/backend/optimizer/path/allpaths.c   |   12 ++++++---
src/backend/optimizer/plan/createplan.c |    9 +++----
src/backend/optimizer/util/pathnode.c   |   40 +++++++++++++-----------------
src/include/foreign/fdwapi.h            |   35 ++------------------------
src/include/nodes/nodes.h               |    1 -
src/include/nodes/plannodes.h           |    3 +-
src/include/nodes/relation.h            |   10 ++++++-
src/include/optimizer/pathnode.h        |    6 ++++-
12 files changed, 103 insertions(+), 125 deletions(-)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2012-03-06 02:20:08
Subject: pgsql: In pg_upgrade, only lock the old cluster if link mode is used,a
Previous:From: Simon RiggsDate: 2012-03-05 19:37:06
Subject: Re: pgsql: Add isolation test to check-world and installcheck-world

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group