aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeTidscan.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-04-27 17:48:57 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-04-27 17:48:57 -0400
commit5194024d72f33fb209e10f9ab0ada7cc67df45b7 (patch)
tree81de10ef02d808084d0b62d2ed2bd609954be176 /src/backend/executor/nodeTidscan.c
parentf5d576c6d278a61beec282b9b276a3a3cb2aec50 (diff)
downloadpostgresql-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/nodeTidscan.c')
-rw-r--r--src/backend/executor/nodeTidscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/nodeTidscan.c b/src/backend/executor/nodeTidscan.c
index ced9c8b1b58..316a4ed0136 100644
--- a/src/backend/executor/nodeTidscan.c
+++ b/src/backend/executor/nodeTidscan.c
@@ -531,7 +531,7 @@ ExecInitTidScan(TidScan *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);
tidstate->ss.ss_currentRelation = currentRelation;
tidstate->ss.ss_currentScanDesc = NULL; /* no heap scan here */