File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 77 * Portions Copyright (c) 1994, Regents of the University of California
88 *
99 * IDENTIFICATION
10- * $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.151 2005/04/28 21:47:14 tgl Exp $
10+ * $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.152 2005/05/29 18:34:57 tgl Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -699,7 +699,6 @@ ApplyRetrieveRule(Query *parsetree,
699699 int rt_index ,
700700 bool relation_level ,
701701 Relation relation ,
702- bool relIsUsed ,
703702 List * activeRIRs )
704703{
705704 Query * rule_action ;
@@ -870,7 +869,6 @@ fireRIRrules(Query *parsetree, List *activeRIRs)
870869 RuleLock * rules ;
871870 RewriteRule * rule ;
872871 LOCKMODE lockmode ;
873- bool relIsUsed ;
874872 int i ;
875873
876874 ++ rt_index ;
@@ -901,9 +899,8 @@ fireRIRrules(Query *parsetree, List *activeRIRs)
901899 * part of the join set (a source table), or is referenced by any
902900 * Var nodes, or is the result table.
903901 */
904- relIsUsed = rangeTableEntry_used ((Node * ) parsetree , rt_index , 0 );
905-
906- if (!relIsUsed && rt_index != parsetree -> resultRelation )
902+ if (rt_index != parsetree -> resultRelation &&
903+ !rangeTableEntry_used ((Node * ) parsetree , rt_index , 0 ))
907904 continue ;
908905
909906 /*
@@ -978,7 +975,6 @@ fireRIRrules(Query *parsetree, List *activeRIRs)
978975 rt_index ,
979976 rule -> attrno == -1 ,
980977 rel ,
981- relIsUsed ,
982978 activeRIRs );
983979 }
984980
You can’t perform that action at this time.
0 commit comments