* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.151 2005/04/28 21:47:14 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.152 2005/05/29 18:34:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
int rt_index,
bool relation_level,
Relation relation,
- bool relIsUsed,
List *activeRIRs)
{
Query *rule_action;
RuleLock *rules;
RewriteRule *rule;
LOCKMODE lockmode;
- bool relIsUsed;
int i;
++rt_index;
* part of the join set (a source table), or is referenced by any
* Var nodes, or is the result table.
*/
- relIsUsed = rangeTableEntry_used((Node *) parsetree, rt_index, 0);
-
- if (!relIsUsed && rt_index != parsetree->resultRelation)
+ if (rt_index != parsetree->resultRelation &&
+ !rangeTableEntry_used((Node *) parsetree, rt_index, 0))
continue;
/*
rt_index,
rule->attrno == -1,
rel,
- relIsUsed,
activeRIRs);
}