]> granicus.if.org Git - postgresql/commit
Add a materialized view relations.
authorKevin Grittner <kgrittn@postgresql.org>
Mon, 4 Mar 2013 00:23:31 +0000 (18:23 -0600)
committerKevin Grittner <kgrittn@postgresql.org>
Mon, 4 Mar 2013 00:23:31 +0000 (18:23 -0600)
commit3bf3ab8c563699138be02f9dc305b7b77a724307
treea36ddfded0bea88ee863595f58f62661cc61948b
parentb15a6da29217b14f02895af1d9271e84415a91ae
Add a materialized view relations.

A materialized view has a rule just like a view and a heap and
other physical properties like a table.  The rule is only used to
populate the table, references in queries refer to the
materialized data.

This is a minimal implementation, but should still be useful in
many cases.  Currently data is only populated "on demand" by the
CREATE MATERIALIZED VIEW and REFRESH MATERIALIZED VIEW statements.
It is expected that future releases will add incremental updates
with various timings, and that a more refined concept of defining
what is "fresh" data will be developed.  At some point it may even
be possible to have queries use a materialized in place of
references to underlying tables, but that requires the other
above-mentioned features to be working first.

Much of the documentation work by Robert Haas.
Review by Noah Misch, Thom Brown, Robert Haas, Marko Tiikkaja
Security review by KaiGai Kohei, with a decision on how best to
implement sepgsql still pending.
103 files changed:
contrib/oid2name/oid2name.c
contrib/pg_upgrade/info.c
contrib/pg_upgrade/pg_upgrade.c
contrib/pg_upgrade/version_old_8_3.c
contrib/pgstattuple/pgstattuple.c
contrib/vacuumlo/vacuumlo.c
doc/src/sgml/catalogs.sgml
doc/src/sgml/func.sgml
doc/src/sgml/ref/allfiles.sgml
doc/src/sgml/ref/alter_extension.sgml
doc/src/sgml/ref/alter_materialized_view.sgml [new file with mode: 0644]
doc/src/sgml/ref/comment.sgml
doc/src/sgml/ref/create_index.sgml
doc/src/sgml/ref/create_materialized_view.sgml [new file with mode: 0644]
doc/src/sgml/ref/create_table_as.sgml
doc/src/sgml/ref/create_view.sgml
doc/src/sgml/ref/drop_materialized_view.sgml [new file with mode: 0644]
doc/src/sgml/ref/refresh_materialized_view.sgml [new file with mode: 0644]
doc/src/sgml/ref/security_label.sgml
doc/src/sgml/reference.sgml
doc/src/sgml/rules.sgml
src/backend/access/common/reloptions.c
src/backend/access/heap/heapam.c
src/backend/access/heap/tuptoaster.c
src/backend/catalog/aclchk.c
src/backend/catalog/dependency.c
src/backend/catalog/heap.c
src/backend/catalog/objectaddress.c
src/backend/catalog/system_views.sql
src/backend/catalog/toasting.c
src/backend/commands/Makefile
src/backend/commands/alter.c
src/backend/commands/analyze.c
src/backend/commands/cluster.c
src/backend/commands/comment.c
src/backend/commands/copy.c
src/backend/commands/createas.c
src/backend/commands/event_trigger.c
src/backend/commands/explain.c
src/backend/commands/indexcmds.c
src/backend/commands/matview.c [new file with mode: 0644]
src/backend/commands/prepare.c
src/backend/commands/seclabel.c
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/backend/commands/vacuum.c
src/backend/commands/view.c
src/backend/executor/execMain.c
src/backend/executor/spi.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/util/plancat.c
src/backend/parser/analyze.c
src/backend/parser/gram.y
src/backend/parser/parse_utilcmd.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/pgstat.c
src/backend/rewrite/rewriteDefine.c
src/backend/rewrite/rewriteDefine.c.orig [new file with mode: 0644]
src/backend/rewrite/rewriteHandler.c
src/backend/storage/lmgr/predicate.c
src/backend/tcop/dest.c
src/backend/tcop/utility.c
src/backend/utils/adt/dbsize.c
src/backend/utils/adt/xml.c
src/backend/utils/cache/relcache.c
src/bin/initdb/initdb.c
src/bin/pg_dump/common.c
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dump_sort.c
src/bin/psql/command.c
src/bin/psql/describe.c
src/bin/psql/help.c
src/bin/psql/tab-complete.c
src/include/catalog/heap.h
src/include/catalog/pg_class.h
src/include/catalog/pg_proc.h
src/include/commands/createas.h
src/include/commands/explain.h
src/include/commands/matview.h [new file with mode: 0644]
src/include/commands/tablecmds.h
src/include/commands/view.h
src/include/executor/executor.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/nodes/primnodes.h
src/include/parser/kwlist.h
src/include/tcop/dest.h
src/include/utils/builtins.h
src/include/utils/rel.h
src/pl/plpgsql/src/pl_comp.c
src/pl/tcl/pltcl.c
src/test/regress/expected/matview.out [new file with mode: 0644]
src/test/regress/expected/rules.out
src/test/regress/output/misc.source
src/test/regress/parallel_schedule
src/test/regress/serial_schedule
src/test/regress/sql/matview.sql [new file with mode: 0644]