pgsql: Incidental cleanup of matviews code.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Incidental cleanup of matviews code.
Date: 2013-04-27 21:49:20
Message-ID: E1UWCzg-0004cI-VF@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5194024d72f33fb209e10f9ab0ada7cc67df45b7

Modified Files
--------------
src/backend/commands/createas.c | 1 -
src/backend/commands/matview.c | 24 +---------
src/backend/executor/execMain.c | 72 -----------------------------
src/backend/executor/execUtils.c | 22 ++++++++-
src/backend/executor/nodeBitmapHeapscan.c | 2 +-
src/backend/executor/nodeForeignscan.c | 2 +-
src/backend/executor/nodeIndexonlyscan.c | 2 +-
src/backend/executor/nodeIndexscan.c | 2 +-
src/backend/executor/nodeSeqscan.c | 14 +++--
src/backend/executor/nodeTidscan.c | 2 +-
src/backend/nodes/copyfuncs.c | 1 -
src/backend/nodes/equalfuncs.c | 1 -
src/backend/nodes/outfuncs.c | 1 -
src/backend/nodes/readfuncs.c | 1 -
src/backend/parser/analyze.c | 5 --
src/backend/rewrite/rewriteHandler.c | 31 +++++-------
src/include/catalog/catversion.h | 2 +-
src/include/executor/executor.h | 2 +-
src/include/nodes/parsenodes.h | 3 +-
19 files changed, 49 insertions(+), 141 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-04-27 22:55:10 Re: [HACKERS] pgsql: Add sql_drop event for event triggers
Previous Message Peter Eisentraut 2013-04-27 02:47:16 pgsql: Improve message about failed transaction log archiving