diff options
Diffstat (limited to 'src/include/nodes/plannodes.h')
-rw-r--r-- | src/include/nodes/plannodes.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 50ef3dda051..10dd35f0112 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -536,16 +536,28 @@ typedef struct TidRangeScan * relation, we make this a descendant of Scan anyway for code-sharing * purposes. * + * SubqueryScanStatus caches the trivial_subqueryscan property of the node. + * SUBQUERY_SCAN_UNKNOWN means not yet determined. This is only used during + * planning. + * * Note: we store the sub-plan in the type-specific subplan field, not in * the generic lefttree field as you might expect. This is because we do * not want plan-tree-traversal routines to recurse into the subplan without * knowing that they are changing Query contexts. * ---------------- */ +typedef enum SubqueryScanStatus +{ + SUBQUERY_SCAN_UNKNOWN, + SUBQUERY_SCAN_TRIVIAL, + SUBQUERY_SCAN_NONTRIVIAL +} SubqueryScanStatus; + typedef struct SubqueryScan { Scan scan; Plan *subplan; + SubqueryScanStatus scanstatus; } SubqueryScan; /* ---------------- |