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.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index e348d25b2ba..cf93b9dee17 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: plannodes.h,v 1.41 2000/07/12 02:37:33 tgl Exp $
+ * $Id: plannodes.h,v 1.42 2000/09/12 21:07:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -82,7 +82,7 @@ typedef struct Plan
* individual nodes point to one EState
* for the whole top-level plan */
List *targetlist;
- List *qual; /* Node* or List* ?? */
+ List *qual; /* implicitly-ANDed qual conditions */
struct Plan *lefttree;
struct Plan *righttree;
List *extParam; /* indices of _all_ _external_ PARAM_EXEC
@@ -210,9 +210,26 @@ typedef struct TidScan
/* ----------------
* Join node
+ *
+ * jointype: rule for joining tuples from left and right subtrees
+ * joinqual: qual conditions that came from JOIN/ON or JOIN/USING
+ * (plan.qual contains conditions that came from WHERE)
+ *
+ * When jointype is INNER, joinqual and plan.qual are semantically
+ * interchangeable. For OUTER jointypes, the two are *not* interchangeable;
+ * only joinqual is used to determine whether a match has been found for
+ * the purpose of deciding whether to generate null-extended tuples.
+ * (But plan.qual is still applied before actually returning a tuple.)
+ * For an outer join, only joinquals are allowed to be used as the merge
+ * or hash condition of a merge or hash join.
* ----------------
*/
-typedef Plan Join;
+typedef struct Join
+{
+ Plan plan;
+ JoinType jointype;
+ List *joinqual; /* JOIN quals (in addition to plan.qual) */
+} Join;
/* ----------------
* nest loop join node
@@ -245,7 +262,6 @@ typedef struct HashJoin
List *hashclauses;
Oid hashjoinop;
HashJoinState *hashjoinstate;
- bool hashdone;
} HashJoin;
/* ---------------