Simplify and encapsulate tuple routing support code

Enterprise / PostgreSQL - Robert Haas [postgresql.org] - 4 January 2018 20:48 EST

Instead of having ExecSetupPartitionTupleRouting return multiple out parameters, have it return a pointer to a structure containing all of those different things. Also, provide and use a cleanup function, ExecCleanupTupleRouting, instead of cleaning up all of the resources allocated by ExecSetupPartitionTupleRouting individually.

Amit Khandekar, reviewed by Amit Langote, David Rowley, and me

Discussion: http://postgr.es/m/CAJ3gD9fWfxgKC+PfJZF3hkgAcNOy-LpfPxVYitDEXKHjeieWQQ@mail.gmail.com

cc6337d2fe Simplify and encapsulate tuple routing support code.
src/backend/commands/copy.c | 86 ++++++--------------------
src/backend/executor/execPartition.c | 108 ++++++++++++++++++++-------------
src/backend/executor/nodeModifyTable.c | 94 +++++++++-------------------
src/include/executor/execPartition.h | 47 +++++++++++---
src/include/nodes/execnodes.h | 9 +--
5 files changed, 154 insertions(+), 190 deletions(-)

Upstream: git.postgresql.org


  • Share