aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_clause.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-12-12 20:35:16 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-12-12 20:35:16 +0000
commitb0422b215c100bb29c1071872012a1f3c6681058 (patch)
treea764deb63dc546abe6c0b283feac110fd22d01c4 /src/backend/parser/parse_clause.c
parentff7349694f399d0063b51419ea6e25770334f363 (diff)
downloadpostgresql-b0422b215c100bb29c1071872012a1f3c6681058.tar.gz
postgresql-b0422b215c100bb29c1071872012a1f3c6681058.zip
Preliminary code review for domain CHECK constraints patch: add documentation,
make VALUE a non-reserved word again, use less invasive method of passing ConstraintTestValue into transformExpr, fix problems with nested constraint testing, do correct thing with NULL result from a constraint expression, remove memory leak. Domain checks still need much more work if we are going to allow ALTER DOMAIN, however.
Diffstat (limited to 'src/backend/parser/parse_clause.c')
-rw-r--r--src/backend/parser/parse_clause.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c
index 6f05ee329cd..71375f62c97 100644
--- a/src/backend/parser/parse_clause.c
+++ b/src/backend/parser/parse_clause.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.101 2002/12/12 15:49:38 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.102 2002/12/12 20:35:13 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -283,7 +283,7 @@ transformJoinUsingClause(ParseState *pstate, List *leftVars, List *rightVars)
* transformJoinOnClause() does. Just invoke transformExpr() to fix
* up the operators, and we're done.
*/
- result = transformExpr(pstate, result, NULL);
+ result = transformExpr(pstate, result);
result = coerce_to_boolean(result, "JOIN/USING");
@@ -317,7 +317,7 @@ transformJoinOnClause(ParseState *pstate, JoinExpr *j,
pstate->p_namespace = makeList2(j->larg, j->rarg);
/* This part is just like transformWhereClause() */
- result = transformExpr(pstate, j->quals, NULL);
+ result = transformExpr(pstate, j->quals);
result = coerce_to_boolean(result, "JOIN/ON");
@@ -478,7 +478,7 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r)
save_namespace = pstate->p_namespace;
pstate->p_namespace = NIL;
- funcexpr = transformExpr(pstate, r->funccallnode, NULL);
+ funcexpr = transformExpr(pstate, r->funccallnode);
pstate->p_namespace = save_namespace;
@@ -950,7 +950,7 @@ transformWhereClause(ParseState *pstate, Node *clause)
if (clause == NULL)
return NULL;
- qual = transformExpr(pstate, clause, NULL);
+ qual = transformExpr(pstate, clause);
qual = coerce_to_boolean(qual, "WHERE");
@@ -1093,7 +1093,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
* willing to match a resjunk target here, though the above cases must
* ignore resjunk targets.
*/
- expr = transformExpr(pstate, node, NULL);
+ expr = transformExpr(pstate, node);
foreach(tl, tlist)
{