Initial code review for CustomScan patch.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 20 Nov 2014 23:36:07 +0000 (18:36 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 20 Nov 2014 23:36:07 +0000 (18:36 -0500)
commita34fa8ee7cc757671632dc4dcae4f21e8f2e2357
tree6d31c7d830603baaf94e0792b47b08da4ad2ab20
parent081a6048cff07a83591ebcb08b676a771ae58d2b
Initial code review for CustomScan patch.

Get rid of the pernicious entanglement between planner and executor headers
introduced by commit 0b03e5951bf0a1a8868db13f02049cf686a82165.

Also, rearrange the CustomFoo struct/typedef definitions so that all the
typedef names are seen as used by the compiler.  Without this pgindent
will mess things up a bit, which is not so important perhaps, but it also
removes a bizarre discrepancy between the declaration arrangement used for
CustomExecMethods and that used for CustomScanMethods and
CustomPathMethods.

Clean up the commentary around ExecSupportsMarkRestore to reflect the
rather large change in its API.

Const-ify register_custom_path_provider's argument.  This necessitates
casting away const in the function, but that seems better than forcing
callers of the function to do so (or else not const-ify their method
pointer structs, which was sort of the whole point).

De-export fix_expr_common.  I don't like the exporting of fix_scan_expr
or replace_nestloop_params either, but this one surely has got little
excuse.
src/backend/executor/execAmi.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/setrefs.c
src/backend/optimizer/util/pathnode.c
src/include/executor/executor.h
src/include/executor/nodeCustom.h
src/include/nodes/execnodes.h
src/include/nodes/plannodes.h
src/include/nodes/relation.h
src/include/optimizer/pathnode.h
src/include/optimizer/planmain.h