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

Commit41eef0f

Browse files
committed
Fix thinko in matview patch.
"break" instead of "continue" suppressed view expansion for views appearinglater in the range table. Per report from Erikjan Rijkers.While at it, improve the associated comment a bit.
1 parent38fb4d9 commit41eef0f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎src/backend/rewrite/rewriteHandler.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,20 +1605,20 @@ fireRIRrules(Query *parsetree, List *activeRIRs, bool forUpdatePushedDown)
16051605
rel=heap_open(rte->relid,NoLock);
16061606

16071607
/*
1608-
*Skipmaterialized view expansion whenit isbeing created.
1608+
*Ignore RIR rules for amaterialized view, ifit isscannable.
16091609
*
1610-
* NOTE: This is assuming thatwe cannot have gotten to this point
1611-
*with a non-scannable materialized view unlessit isbeing
1612-
*populated, and that if it is scannable we want to use the existing
1613-
*contents.It would be nice to have some way to confirm that we're
1614-
* doing the right thing here, but rule expansion doesn't give us a
1615-
* lot to work with, so we are trusting earlier validations and
1616-
*execution steps toget it right.
1610+
* NOTE: This is assuming thatif an MV is scannable then we always
1611+
*want to use the existing contents, and ifit isnot scannable we
1612+
*cannot have gotten to this point unless it is being populated
1613+
*(otherwise an error should be thrown).It would be nice to have
1614+
*some way to confirm that we'redoing the right thing here, but rule
1615+
*expansion doesn't give us alot to work with, so we are trusting
1616+
*earlier validations tothrow error if needed.
16171617
*/
16181618
if (rel->rd_rel->relkind==RELKIND_MATVIEW&&rel->rd_isscannable)
16191619
{
16201620
heap_close(rel,NoLock);
1621-
break;
1621+
continue;
16221622
}
16231623

16241624
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp