*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.23 1998/10/02 21:53:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.24 1998/10/20 17:21:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return;
}
+ exp = copyObject(exp);
if (var->varlevelsup > 0 &&
nodeTag(exp) == T_Var) {
- exp = copyObject(exp);
((Var *)exp)->varlevelsup = var->varlevelsup;
- }
+ }
*nodePtr = exp;
*modified = TRUE;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.20 1998/10/08 18:29:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.21 1998/10/20 17:21:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
{
if (info->event == CMD_UPDATE)
{
- ((Var *) node)->varno = info->current_varno;
- ((Var *) node)->varnoold = info->current_varno;
+ *nodePtr = n = copyObject(node);
+ ((Var *) n)->varno = info->current_varno;
+ ((Var *) n)->varnoold = info->current_varno;
}
else
*nodePtr = make_null(((Var *) node)->vartype);
}
else
- *nodePtr = n;
+ *nodePtr = copyObject(n);
}
break;
}