summaryrefslogtreecommitdiff
path: root/src/include/executor/executor.h
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/include/executor/executor.h
parent08fb7375e35863e0ba2b8bb6a6c75802ca13fe85 (diff)
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/include/executor/executor.h')
-rw-r--r--src/include/executor/executor.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index af599330a09..88dcb741b3d 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: executor.h,v 1.40 1999/12/10 03:56:08 momjian Exp $
+ * $Id: executor.h,v 1.41 2000/01/19 23:55:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,17 +24,7 @@
*/
/* return: true if tuple in slot is NULL, slot is slot to test */
#define TupIsNull(slot) \
-( \
- ((slot) == NULL) ? \
- true \
- : \
- ( \
- ((slot)->val == NULL) ? \
- true \
- : \
- false \
- ) \
-)
+ ((slot) == NULL || (slot)->val == NULL)
/*
* prototypes from functions in execAmi.c
@@ -88,13 +78,12 @@ extern Datum ExecExtractResult(TupleTableSlot *slot, AttrNumber attnum,
extern Datum ExecEvalParam(Param *expression, ExprContext *econtext,
bool *isNull);
-/* stop here */
extern char *GetAttributeByNum(TupleTableSlot *slot, AttrNumber attrno,
bool *isNull);
extern char *GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull);
extern Datum ExecEvalExpr(Node *expression, ExprContext *econtext, bool *isNull,
bool *isDone);
-extern bool ExecQual(List *qual, ExprContext *econtext);
+extern bool ExecQual(List *qual, ExprContext *econtext, bool resultForNull);
extern int ExecTargetListLength(List *targetlist);
extern TupleTableSlot *ExecProject(ProjectionInfo *projInfo, bool *isDone);