Skip to content

Commit d5013ab

Browse files
committed
Fix one more place where we were expecting lcons() to be nondestructive
to the original List; per report from Sebastian BÎck. I think this is the last such bug --- I examined every lcons() call in the backend and the rest seem OK --- but it's nervous-making that we're still finding 'em so many months after the List rewrite went in.
1 parent 0b5c72d commit d5013ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/rewrite/rewriteHandler.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.145 2004/11/06 17:46:35 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/rewrite/rewriteHandler.c,v 1.146 2004/11/20 17:59:31 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1267,6 +1267,8 @@ RewriteQuery(Query *parsetree, List *rewrite_events)
12671267
newstuff = RewriteQuery(pt, rewrite_events);
12681268
rewritten = list_concat(rewritten, newstuff);
12691269
}
1270+
1271+
rewrite_events = list_delete_first(rewrite_events);
12701272
}
12711273
}
12721274

0 commit comments

Comments
 (0)