1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Add an "argisrow" field to NullTest nodes, following a plan made way back in

8.2beta but never carried out.  This avoids repetitive tests of whether the
argument is of scalar or composite type.  Also, be a bit more paranoid about
composite arguments in some places where we previously weren't checking.
This commit is contained in:
Tom Lane
2010-01-01 23:03:10 +00:00
parent 29c4ad9829
commit 7839d35991
14 changed files with 41 additions and 30 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.257 2009/12/29 17:40:59 heikki Exp $
* $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.258 2010/01/01 23:03:09 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -3475,7 +3475,7 @@ ExecEvalNullTest(NullTestState *nstate,
if (isDone && *isDone == ExprEndResult)
return result; /* nothing to check */
if (nstate->argisrow && !(*isNull))
if (ntest->argisrow && !(*isNull))
{
HeapTupleHeader tuple;
Oid tupType;
@ -4704,7 +4704,6 @@ ExecInitExpr(Expr *node, PlanState *parent)
nstate->xprstate.evalfunc = (ExprStateEvalFunc) ExecEvalNullTest;
nstate->arg = ExecInitExpr(ntest->arg, parent);
nstate->argisrow = type_is_rowtype(exprType((Node *) ntest->arg));
nstate->argdesc = NULL;
state = (ExprState *) nstate;
}