Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit41accb0

Browse files
committed
Fix another place that assumed 'x = lcons(y, z)' would not have any
side-effect on the original list z. I fear we have a few more of theseto track down yet :-(.
1 parentf54b956 commit41accb0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎src/backend/rewrite/rewriteHandler.c

Lines changed: 5 additions & 4 deletions
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.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);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp