SQL/MED will have some kinds of planner hooks to support FDW-depending
plan execution. Then, we will need to support user-defined executor nodes.
The proposed SQL/MED has own "executor node hooks" in ForeignTableScan,
but I think it will be cleaner to support it in executor level.
The attached patch is an experimental code to do it; Plan struct has
"vtable" field as a set of functions to generate and execute PlanState
nodes. It changes large switch-case blocks in the current executor
into function-pointer calls as like as virtual functions in C++.
Is it worth doing? If we will go to the direction, I'll continue to
research it, like extensibility of Path nodes and EXPLAIN support.
-------- Essence of the patch --------
typedef struct Plan
PlanVTable *vtable; /* executor procs */
node = makeNode(SeqScan);
node->vtable = &SeqScanVTable;
pgsql-hackers by date
|Next:||From: Shigeru HANADA||Date: 2010-10-25 11:45:25|
|Subject: SQL/MED with simple wrappers|
|Previous:||From: Heikki Linnakangas||Date: 2010-10-25 08:17:10|
|Subject: Re: Range Types, discrete and/or continuous|