aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-01-01 23:03:10 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-01-01 23:03:10 +0000
commit7839d35991f1c79a291e67635d5f4c5750c16e9b (patch)
tree98f44976c68f2ac0b707f4efcc8f3949cdc9ac68 /src/backend/parser/parse_expr.c
parent29c4ad98293e3c5cb3fcdd413a3f4904efff8762 (diff)
downloadpostgresql-7839d35991f1c79a291e67635d5f4c5750c16e9b.tar.gz
postgresql-7839d35991f1c79a291e67635d5f4c5750c16e9b.zip
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.
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r--src/backend/parser/parse_expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 7dc20b4d6a7..c5c7e7e873d 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.251 2009/12/15 17:57:47 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.252 2010/01/01 23:03:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -276,6 +276,7 @@ transformExpr(ParseState *pstate, Node *expr)
n->arg = (Expr *) transformExpr(pstate, (Node *) n->arg);
/* the argument can be any type, so don't coerce it */
+ n->argisrow = type_is_rowtype(exprType((Node *) n->arg));
result = expr;
break;
}