diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/nodes/plannodes.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 29d7732d6a0..3d196f5078e 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -253,6 +253,20 @@ typedef struct Plan /* ---------------- + * ResultType - + * Classification of Result nodes + * ---------------- + */ +typedef enum ResultType +{ + RESULT_TYPE_GATING, /* project or one-time-filter outer plan */ + RESULT_TYPE_SCAN, /* replace empty scan */ + RESULT_TYPE_JOIN, /* replace empty join */ + RESULT_TYPE_UPPER, /* replace degenerate upper rel */ + RESULT_TYPE_MINMAX /* implement minmax aggregate */ +} ResultType; + +/* ---------------- * Result node - * If no outer plan, evaluate a variable-free targetlist. * If outer plan, return tuples from outer plan (after a level of @@ -261,12 +275,20 @@ typedef struct Plan * If resconstantqual isn't NULL, it represents a one-time qualification * test (i.e., one that doesn't depend on any variables from the outer plan, * so needs to be evaluated only once). + * + * relids identifies the relation for which this Result node is generating the + * tuples. When subplan is not NULL, it should be empty: this node is not + * generating anything in that case, just acting on tuples generated by the + * subplan. Otherwise, it contains the relids of the planner relation that + * the Result represents. * ---------------- */ typedef struct Result { Plan plan; + ResultType result_type; Node *resconstantqual; + Bitmapset *relids; } Result; /* ---------------- |