diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-04-27 17:48:57 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-04-27 17:48:57 -0400 |
commit | 5194024d72f33fb209e10f9ab0ada7cc67df45b7 (patch) | |
tree | 81de10ef02d808084d0b62d2ed2bd609954be176 /src/backend/executor/nodeIndexonlyscan.c | |
parent | f5d576c6d278a61beec282b9b276a3a3cb2aec50 (diff) | |
download | postgresql-5194024d72f33fb209e10f9ab0ada7cc67df45b7.tar.gz postgresql-5194024d72f33fb209e10f9ab0ada7cc67df45b7.zip |
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.
Diffstat (limited to 'src/backend/executor/nodeIndexonlyscan.c')
-rw-r--r-- | src/backend/executor/nodeIndexonlyscan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/nodeIndexonlyscan.c b/src/backend/executor/nodeIndexonlyscan.c index 7d01f8166e6..2f30c55c54a 100644 --- a/src/backend/executor/nodeIndexonlyscan.c +++ b/src/backend/executor/nodeIndexonlyscan.c @@ -410,7 +410,7 @@ ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags) /* * open the base relation and acquire appropriate lock on it. */ - currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid); + currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags); indexstate->ss.ss_currentRelation = currentRelation; indexstate->ss.ss_currentScanDesc = NULL; /* no heap scan here */ |