]> granicus.if.org Git - postgresql/blobdiff - src/include/nodes/execnodes.h
Fix executor to work correctly with mergejoins where left and
[postgresql] / src / include / nodes / execnodes.h
index afca5d36d3dc4629f4c130e739c1875dabcc902a..c7f6fa35b2d245a09ead74539f4e82395f52590f 100644 (file)
@@ -1,12 +1,12 @@
 /*-------------------------------------------------------------------------
  *
- * execnodes.h--
+ * execnodes.h
  *       definitions for executor state nodes
  *
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: execnodes.h,v 1.20 1998/12/14 05:19:16 scrappy Exp $
+ * $Id: execnodes.h,v 1.26 1999/02/28 00:36:04 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -194,20 +194,28 @@ typedef struct JunkFilter
  */
 typedef struct EState
 {
-       NodeTag         type;
-       ScanDirection es_direction;
-       Snapshot        es_snapshot;
-       List       *es_range_table;
-       RelationInfo *es_result_relation_info;
-       Relation        es_into_relation_descriptor;
-       ParamListInfo es_param_list_info;
-       ParamExecData *es_param_exec_vals;      /* this is for subselects */
-       int                     es_BaseId;
-       TupleTable      es_tupleTable;
-       JunkFilter *es_junkFilter;
-       int                *es_refcount;
-       uint32          es_processed;   /* # of tuples processed */
-       Oid                     es_lastoid;             /* last oid processed (by INSERT) */
+       NodeTag                 type;
+       ScanDirection   es_direction;
+       Snapshot                es_snapshot;
+       List               *es_range_table;
+       RelationInfo   *es_result_relation_info;
+       List              **es_result_relation_constraints;
+       Relation                es_into_relation_descriptor;
+       ParamListInfo   es_param_list_info;
+       ParamExecData  *es_param_exec_vals;     /* this is for subselects */
+       int                             es_BaseId;
+       TupleTable              es_tupleTable;
+       JunkFilter         *es_junkFilter;
+       int                        *es_refcount;
+       uint32                  es_processed;   /* # of tuples processed */
+       Oid                             es_lastoid;             /* last oid processed (by INSERT) */
+       List               *es_rowMark;         /* not good place, but there is no other */
+       /* Below is to re-evaluate plan qual in READ COMMITTED mode */
+       struct Plan        *es_origPlan;
+       Pointer                 es_evalPlanQual;
+       bool               *es_evTupleNull;
+       HeapTuple          *es_evTuple;
+       bool                    es_useEvalPlan;
 } EState;
 
 /* ----------------
@@ -455,8 +463,8 @@ typedef struct NestLoopState
 /* ----------------
  *      MergeJoinState information
  *
- *             OSortopI                   outerKey1 sortOp innerKey1 ...
- *             ISortopO                   innerkey1 sortOp outerkey1 ...
+ *             OuterSkipQual      outerKey1 < innerKey1 ...
+ *             InnerSkipQual      outerKey1 > innerKey1 ...
  *             JoinState                  current "state" of join. see executor.h
  *             MarkedTupleSlot    pointer to slot in tuple table for marked tuple
  *
@@ -475,8 +483,8 @@ typedef struct NestLoopState
 typedef struct MergeJoinState
 {
        JoinState       jstate;                 /* its first field is NodeTag */
-       List       *mj_OSortopI;
-       List       *mj_ISortopO;
+       List       *mj_OuterSkipQual;
+       List       *mj_InnerSkipQual;
        int                     mj_JoinState;
        TupleTableSlot *mj_MarkedTupleSlot;
 } MergeJoinState;
@@ -599,7 +607,7 @@ typedef struct GroupState
  *      SortState information
  *
  *|            sort nodes are really just a kind of a scan since
- *|            we implement sorts by retrieveing the entire subplan
+ *|            we implement sorts by retrieving the entire subplan
  *|            into a temp relation, sorting the temp relation into
  *|            another sorted relation, and then preforming a simple
  *|            unqualified sequential scan on the sorted relation..