File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
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.136 2004/05/26 04:41:33 neilc Exp $
10+ * $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.137 2004/05/29 05:55:13 tgl Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -864,15 +864,14 @@ fireRIRrules(Query *parsetree, List *activeRIRs)
864864 */
865865 if (locks != NIL )
866866 {
867- List * newActiveRIRs ;
868867 ListCell * l ;
869868
870869 if (oidMember (RelationGetRelid (rel ), activeRIRs ))
871870 ereport (ERROR ,
872871 (errcode (ERRCODE_INVALID_OBJECT_DEFINITION ),
873872 errmsg ("infinite recursion detected in rules for relation \"%s\"" ,
874873 RelationGetRelationName (rel ))));
875- newActiveRIRs = lconso (RelationGetRelid (rel ), activeRIRs );
874+ activeRIRs = lconso (RelationGetRelid (rel ), activeRIRs );
876875
877876 foreach (l , locks )
878877 {
@@ -884,8 +883,10 @@ fireRIRrules(Query *parsetree, List *activeRIRs)
884883 rule -> attrno == -1 ,
885884 rel ,
886885 relIsUsed ,
887- newActiveRIRs );
886+ activeRIRs );
888887 }
888+
889+ activeRIRs = list_delete_first (activeRIRs );
889890 }
890891
891892 heap_close (rel , NoLock );
You can’t perform that action at this time.
0 commit comments