aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeMergejoin.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-01-19 23:55:03 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-01-19 23:55:03 +0000
commit6d1efd76fb9852b8bc242dcaf35916090d7c5899 (patch)
treef827384a43f7dc18532337d555038e02498368b0 /src/backend/executor/nodeMergejoin.c
parent08fb7375e35863e0ba2b8bb6a6c75802ca13fe85 (diff)
downloadpostgresql-6d1efd76fb9852b8bc242dcaf35916090d7c5899.tar.gz
postgresql-6d1efd76fb9852b8bc242dcaf35916090d7c5899.zip
Fix handling of NULL constraint conditions: per SQL92 spec, a NULL result
from a constraint condition does not violate the constraint (cf. discussion on pghackers 12/9/99). Implemented by adding a parameter to ExecQual, specifying whether to return TRUE or FALSE when the qual result is really NULL in three-valued boolean logic. Currently, ExecRelCheck is the only caller that asks for TRUE, but if we find any other places that have the wrong response to NULL, it'll be easy to fix them.
Diffstat (limited to 'src/backend/executor/nodeMergejoin.c')
-rw-r--r--src/backend/executor/nodeMergejoin.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c
index b15e135465d..59287c0f509 100644
--- a/src/backend/executor/nodeMergejoin.c
+++ b/src/backend/executor/nodeMergejoin.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.32 1999/11/22 17:56:03 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.33 2000/01/19 23:54:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -186,12 +186,12 @@ MJFormSkipQual(List *qualList, char *replaceopname)
* MergeCompare
*
* Compare the keys according to 'compareQual' which is of the
- * form: {(key1a > key2a)(key1b > key2b) ...}.
+ * form: { (key1a > key2a) (key1b > key2b) ... }.
*
- * (actually, it could also be the form (key1a < key2a)..)
+ * (actually, it could also be of the form (key1a < key2a)...)
*
* This is different from calling ExecQual because ExecQual returns
- * true only if ALL the comparisions clauses are satisfied.
+ * true only if ALL the comparison clauses are satisfied.
* However, there is an order of significance among the keys with
* the first keys being most significant. Therefore, the clauses
* are evaluated in order and the 'compareQual' is satisfied
@@ -217,14 +217,14 @@ MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext)
/* ----------------
* for each pair of clauses, test them until
- * our compare conditions are satisified
+ * our compare conditions are satisfied
* ----------------
*/
eqclause = eqQual;
foreach(clause, compareQual)
{
/* ----------------
- * first test if our compare clause is satisified.
+ * first test if our compare clause is satisfied.
* if so then return true. ignore isDone, don't iterate in
* quals.
* ----------------
@@ -255,7 +255,7 @@ MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext)
/* ----------------
* if we get here then it means none of our key greater-than
- * conditions were satisified so we return false.
+ * conditions were satisfied so we return false.
* ----------------
*/
return false;
@@ -547,7 +547,7 @@ ExecMergeJoin(MergeJoin *node)
case EXEC_MJ_JOINTEST:
MJ_printf("ExecMergeJoin: EXEC_MJ_JOINTEST\n");
- qualResult = ExecQual((List *) mergeclauses, econtext);
+ qualResult = ExecQual((List *) mergeclauses, econtext, false);
MJ_DEBUG_QUAL(mergeclauses, qualResult);
if (qualResult)
@@ -558,14 +558,14 @@ ExecMergeJoin(MergeJoin *node)
/*
* EXEC_MJ_JOINTUPLES means we have two tuples which
- * satisified the merge clause so we join them and then
+ * satisfied the merge clause so we join them and then
* proceed to get the next inner tuple (EXEC_NEXT_INNER).
*/
case EXEC_MJ_JOINTUPLES:
MJ_printf("ExecMergeJoin: EXEC_MJ_JOINTUPLES\n");
mergestate->mj_JoinState = EXEC_MJ_NEXTINNER;
- qualResult = ExecQual((List *) qual, econtext);
+ qualResult = ExecQual((List *) qual, econtext, false);
MJ_DEBUG_QUAL(qual, qualResult);
if (qualResult)
@@ -693,7 +693,7 @@ ExecMergeJoin(MergeJoin *node)
innerTupleSlot = econtext->ecxt_innertuple;
econtext->ecxt_innertuple = mergestate->mj_MarkedTupleSlot;
- qualResult = ExecQual((List *) mergeclauses, econtext);
+ qualResult = ExecQual((List *) mergeclauses, econtext, false);
MJ_DEBUG_QUAL(mergeclauses, qualResult);
if (qualResult)
@@ -777,7 +777,7 @@ ExecMergeJoin(MergeJoin *node)
* we update the marked tuple and go join them.
* ----------------
*/
- qualResult = ExecQual((List *) mergeclauses, econtext);
+ qualResult = ExecQual((List *) mergeclauses, econtext, false);
MJ_DEBUG_QUAL(mergeclauses, qualResult);
if (qualResult)
@@ -886,7 +886,7 @@ ExecMergeJoin(MergeJoin *node)
* we update the marked tuple and go join them.
* ----------------
*/
- qualResult = ExecQual((List *) mergeclauses, econtext);
+ qualResult = ExecQual((List *) mergeclauses, econtext, false);
MJ_DEBUG_QUAL(mergeclauses, qualResult);
if (qualResult)