aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nodes/execnodes.h33
-rw-r--r--src/include/nodes/nodes.h5
-rw-r--r--src/include/nodes/plannodes.h16
-rw-r--r--src/include/nodes/relation.h9
-rw-r--r--src/include/optimizer/cost.h4
-rw-r--r--src/include/optimizer/pathnode.h3
-rw-r--r--src/include/optimizer/paths.h8
7 files changed, 70 insertions, 8 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 44aa8b8ace5..47e6e40b7c2 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execnodes.h,v 1.37 1999/10/17 22:15:07 tgl Exp $
+ * $Id: execnodes.h,v 1.38 1999/11/23 20:07:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -414,6 +414,37 @@ typedef struct IndexScanState
HeapTupleData iss_htup;
} IndexScanState;
+/* ----------------
+ * TidScanState information
+ *
+ *| tid scans don't use CommonScanState because
+ *| the underlying AM abstractions for heap scans and
+ *| tid scans are too different.. It would be nice
+ *| if the current abstraction was more useful but ... -cim 10/15/89
+ *
+ * TidPtr current tid in use
+ * NumTids number of tids in this scan
+ * tidList evaluated item pointers
+ *
+ * CommonState information
+ *
+ * OuterTupleSlot pointer to slot containing current "outer" tuple
+ * ResultTupleSlot pointer to slot in tuple table for projected tuple
+ * ExprContext node's current expression context
+ * ProjInfo info this node uses to form tuple projections
+ * NumScanAttributes size of ScanAttributes array
+ * ScanAttributes attribute numbers of interest in this tuple
+ * ----------------
+ */
+typedef struct TidScanState
+{
+ CommonState cstate; /* its first field is NodeTag */
+ int tss_NumTids;
+ int tss_TidPtr;
+ int tss_MarkTidPtr;
+ ItemPointer *tss_TidList;
+ HeapTupleData tss_htup;
+} TidScanState;
/* ----------------------------------------------------------------
* Join State Information
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 09f60466f43..4e830d7527c 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.55 1999/10/15 01:49:47 momjian Exp $
+ * $Id: nodes.h,v 1.56 1999/11/23 20:07:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,6 +47,7 @@ typedef enum NodeTag
T_Choose,
T_Group,
T_SubPlan,
+ T_TidScan,
/*---------------------
* TAGS FOR PRIMITIVE NODES (primnodes.h)
@@ -80,6 +81,7 @@ typedef enum NodeTag
T_RestrictInfo,
T_JoinInfo,
T_Stream,
+ T_TidPath,
/*---------------------
* TAGS FOR EXECUTOR NODES (execnodes.h)
@@ -110,6 +112,7 @@ typedef enum NodeTag
T_SortState,
T_UniqueState,
T_HashState,
+ T_TidScanState,
/*---------------------
* TAGS FOR MEMORY NODES (memnodes.h)
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index 00e7025917d..9cd06e2d932 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: plannodes.h,v 1.33 1999/11/15 03:28:06 tgl Exp $
+ * $Id: plannodes.h,v 1.34 1999/11/23 20:07:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -179,7 +179,19 @@ typedef struct IndexScan
IndexScanState *indxstate;
} IndexScan;
-/*
+/* ----------------
+ * tid scan node
+ * ----------------
+ */
+typedef struct TidScan
+{
+ Scan scan;
+ bool needRescan;
+ List *tideval;
+ TidScanState *tidstate;
+} TidScan;
+
+/*
* ==========
* Join nodes
* ==========
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index 91fa85dd25e..0f143017b2a 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: relation.h,v 1.38 1999/08/16 02:17:40 tgl Exp $
+ * $Id: relation.h,v 1.39 1999/11/23 20:07:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -193,6 +193,13 @@ typedef struct IndexPath
Relids joinrelids; /* other rels mentioned in indexqual */
} IndexPath;
+typedef struct TidPath
+{
+ Path path;
+ List *tideval;
+ Relids unjoined_relids; /* some rels not yet part of my Path */
+} TidPath;
+
/*
* All join-type paths share these fields.
*/
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h
index 6791435a4d1..abde39b237c 100644
--- a/src/include/optimizer/cost.h
+++ b/src/include/optimizer/cost.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: cost.h,v 1.23 1999/08/06 04:00:13 tgl Exp $
+ * $Id: cost.h,v 1.24 1999/11/23 20:07:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,11 +31,13 @@ extern bool _enable_sort_;
extern bool _enable_nestloop_;
extern bool _enable_mergejoin_;
extern bool _enable_hashjoin_;
+extern bool _enable_tidscan_;
extern Cost cost_seqscan(int relid, int relpages, int reltuples);
extern Cost cost_index(Oid indexid, int expected_indexpages, Cost selec,
int relpages, int reltuples, int indexpages,
int indextuples, bool is_injoin);
+extern Cost cost_tidscan(List *evallist);
extern Cost cost_sort(List *pathkeys, int tuples, int width);
extern Cost cost_nestloop(Cost outercost, Cost innercost, int outertuples,
int innertuples, int outerpages, bool is_indexjoin);
diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h
index 65ece63c575..2aca95e605d 100644
--- a/src/include/optimizer/pathnode.h
+++ b/src/include/optimizer/pathnode.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pathnode.h,v 1.21 1999/08/16 02:17:45 tgl Exp $
+ * $Id: pathnode.h,v 1.22 1999/11/23 20:07:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,6 +27,7 @@ extern Path *create_seqscan_path(RelOptInfo *rel);
extern IndexPath *create_index_path(Query *root, RelOptInfo *rel,
RelOptInfo *index, List *restriction_clauses);
+extern TidPath *create_tidscan_path(RelOptInfo *rel, List *tideval);
extern NestPath *create_nestloop_path(RelOptInfo *joinrel,
RelOptInfo *outer_rel, Path *outer_path, Path *inner_path,
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h
index 58da94368c9..92ce9f9719f 100644
--- a/src/include/optimizer/paths.h
+++ b/src/include/optimizer/paths.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: paths.h,v 1.35 1999/08/21 03:49:15 tgl Exp $
+ * $Id: paths.h,v 1.36 1999/11/23 20:07:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,6 +31,12 @@ extern List *create_index_paths(Query *root, RelOptInfo *rel, List *indices,
extern List *expand_indexqual_conditions(List *indexquals);
/*
+ * tidpath.h
+ * routines to generate tid paths
+ */
+extern List *create_tidscan_paths(Query *root, RelOptInfo *rel);
+
+/*
* joinpath.c
* routines to create join paths
*/