aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execScan.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/execScan.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/execScan.c')
-rw-r--r--src/backend/executor/execScan.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/executor/execScan.c b/src/backend/executor/execScan.c
index 4196fb7a8a4..4803653e14c 100644
--- a/src/backend/executor/execScan.c
+++ b/src/backend/executor/execScan.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.9 1999/02/13 23:15:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.10 2000/01/19 23:54:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -137,9 +137,10 @@ ExecScan(Scan *node,
/*
* add a check for non-nil qual here to avoid a function call to
- * ExecQual() when the qual is nil
+ * ExecQual() when the qual is nil ... saves only a few cycles,
+ * but they add up ...
*/
- if (!qual || ExecQual(qual, econtext) == true)
+ if (!qual || ExecQual(qual, econtext, false))
break;
}