Обсуждение: pgsql: Rearrange CustomScan API.

Поиск
Список
Период
Сортировка

pgsql: Rearrange CustomScan API.

От
Tom Lane
Дата:
Rearrange CustomScan API.

Make it work more like FDW plans do: instead of assuming that there are
expressions in a CustomScan plan node that the core code doesn't know
about, insist that all subexpressions that need planner attention be in
a "custom_exprs" list in the Plan representation.  (Of course, the
custom plugin can break the list apart again at executor initialization.)
This lets us revert the parts of the patch that exposed setrefs.c and
subselect.c processing to the outside world.

Also revert the GetSpecialCustomVar stuff in ruleutils.c; that concept
may work in future, but it's far from fully baked right now.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/447770404cce5ce86174fa4809784c4e5d0a0a76

Modified Files
--------------
src/backend/nodes/copyfuncs.c           |   21 ++++++----
src/backend/nodes/outfuncs.c            |   16 +++++--
src/backend/optimizer/plan/createplan.c |   49 ++++++++++++++--------
src/backend/optimizer/plan/setrefs.c    |   27 +++++-------
src/backend/optimizer/plan/subselect.c  |   21 ++--------
src/backend/utils/adt/ruleutils.c       |   70 -------------------------------
src/include/executor/nodeCustom.h       |    1 -
src/include/nodes/execnodes.h           |   16 ++++---
src/include/nodes/plannodes.h           |   18 ++++----
src/include/nodes/relation.h            |   30 ++++++++-----
src/include/optimizer/planmain.h        |    2 -
11 files changed, 108 insertions(+), 163 deletions(-)