diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-01-19 23:55:03 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-01-19 23:55:03 +0000 |
commit | 6d1efd76fb9852b8bc242dcaf35916090d7c5899 (patch) | |
tree | f827384a43f7dc18532337d555038e02498368b0 /src/backend/executor/execUtils.c | |
parent | 08fb7375e35863e0ba2b8bb6a6c75802ca13fe85 (diff) | |
download | postgresql-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/execUtils.c')
-rw-r--r-- | src/backend/executor/execUtils.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index d168071e1fe..4d5079ae694 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.51 1999/12/20 10:40:42 wieck Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.52 2000/01/19 23:54:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1137,7 +1137,6 @@ ExecInsertIndexTuples(TupleTableSlot *slot, IndexInfo **indexInfoArray; IndexInfo *indexInfo; Node *predicate; - bool satisfied; ExprContext *econtext; InsertIndexResult result; int numberOfAttributes; @@ -1178,8 +1177,7 @@ ExecInsertIndexTuples(TupleTableSlot *slot, econtext->ecxt_scantuple = slot; /* Skip this index-update if the predicate isn't satisfied */ - satisfied = ExecQual((List *) predicate, econtext); - if (satisfied == false) + if (! ExecQual((List *) predicate, econtext, false)) continue; } |