1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Incidental cleanup of matviews code.

Move checking for unscannable matviews into ExecOpenScanRelation, which is
a better place for it first because the open relation is already available
(saving a relcache lookup cycle), and second because this eliminates the
problem of telling the difference between rangetable entries that will or
will not be scanned by the query.  In particular we can get rid of the
not-terribly-well-thought-out-or-implemented isResultRel field that the
initial matviews patch added to RangeTblEntry.

Also get rid of entirely unnecessary scannability check in the rewriter,
and a bogus decision about whether RefreshMatViewStmt requires a parse-time
snapshot.

catversion bump due to removal of a RangeTblEntry field, which changes
stored rules.
This commit is contained in:
Tom Lane
2013-04-27 17:48:57 -04:00
parent f5d576c6d2
commit 5194024d72
19 changed files with 49 additions and 141 deletions

View File

@ -325,11 +325,6 @@ analyze_requires_snapshot(Node *parseTree)
result = true;
break;
case T_RefreshMatViewStmt:
/* yes, because the SELECT from pg_rewrite must be analyzed */
result = true;
break;
default:
/* other utility statements don't have any real parse analysis */
result = false;