]> granicus.if.org Git - postgresql/commit
Incidental cleanup of matviews code.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 27 Apr 2013 21:48:57 +0000 (17:48 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 27 Apr 2013 21:48:57 +0000 (17:48 -0400)
commit5194024d72f33fb209e10f9ab0ada7cc67df45b7
tree81de10ef02d808084d0b62d2ed2bd609954be176
parentf5d576c6d278a61beec282b9b276a3a3cb2aec50
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.
19 files changed:
src/backend/commands/createas.c
src/backend/commands/matview.c
src/backend/executor/execMain.c
src/backend/executor/execUtils.c
src/backend/executor/nodeBitmapHeapscan.c
src/backend/executor/nodeForeignscan.c
src/backend/executor/nodeIndexonlyscan.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeSeqscan.c
src/backend/executor/nodeTidscan.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/parser/analyze.c
src/backend/rewrite/rewriteHandler.c
src/include/catalog/catversion.h
src/include/executor/executor.h
src/include/nodes/parsenodes.h