*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.283 2010/01/02 16:57:48 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.284 2010/01/19 16:33:33 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
context);
if (arg && IsA(arg, RowExpr))
{
- RowExpr *rarg = (RowExpr *) arg;
- List *newargs = NIL;
- ListCell *l;
-
/*
* We break ROW(...) IS [NOT] NULL into separate tests on its
* component fields. This form is usually more efficient to
* evaluate, as well as being more amenable to optimization.
*/
+ RowExpr *rarg = (RowExpr *) arg;
+ List *newargs = NIL;
+ ListCell *l;
+
+ Assert(ntest->argisrow);
+
foreach(l, rarg->args)
{
Node *relem = (Node *) lfirst(l);
newntest = makeNode(NullTest);
newntest->arg = (Expr *) relem;
newntest->nulltesttype = ntest->nulltesttype;
- newntest->argisrow = ntest->argisrow;
+ newntest->argisrow = type_is_rowtype(exprType(relem));
newargs = lappend(newargs, newntest);
}
/* If all the inputs were constants, result is TRUE */