aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/plannodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/nodes/plannodes.h')
-rw-r--r--src/include/nodes/plannodes.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index 4f59e30d62d..29d7732d6a0 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -29,6 +29,21 @@
*/
/* ----------------
+ * PlannedStmtOrigin
+ *
+ * PlannedStmtOrigin identifies from where a PlannedStmt comes from.
+ * ----------------
+ */
+typedef enum PlannedStmtOrigin
+{
+ PLAN_STMT_UNKNOWN = 0, /* plan origin is not yet known */
+ PLAN_STMT_INTERNAL, /* generated internally by a query */
+ PLAN_STMT_STANDARD, /* standard planned statement */
+ PLAN_STMT_CACHE_GENERIC, /* Generic cached plan */
+ PLAN_STMT_CACHE_CUSTOM, /* Custom cached plan */
+} PlannedStmtOrigin;
+
+/* ----------------
* PlannedStmt node
*
* The output of the planner is a Plan tree headed by a PlannedStmt node.
@@ -58,6 +73,9 @@ typedef struct PlannedStmt
/* plan identifier (can be set by plugins) */
int64 planId;
+ /* origin of plan */
+ PlannedStmtOrigin planOrigin;
+
/* is it insert|update|delete|merge RETURNING? */
bool hasReturning;
@@ -1056,6 +1074,16 @@ typedef struct Memoize
/* paramids from param_exprs */
Bitmapset *keyparamids;
+
+ /* Estimated number of rescans, for EXPLAIN */
+ Cardinality est_calls;
+
+ /* Estimated number of distinct lookup keys, for EXPLAIN */
+ Cardinality est_unique_keys;
+
+ /* Estimated cache hit ratio, for EXPLAIN */
+ double est_hit_ratio;
+
} Memoize;
/* ----------------