aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2013-07-05 15:25:51 -0400
committerNoah Misch <noah@leadboat.com>2013-07-05 15:37:51 -0400
commit02d2b694ee42a9e241d37ce67df122fff43d5bb9 (patch)
treeeaf287ab19600a27a1c1304d108241326d6e3e3d /src/backend/commands
parent269e780822abb2e44189afaccd6b0ee7aefa7ddd (diff)
downloadpostgresql-02d2b694ee42a9e241d37ce67df122fff43d5bb9.tar.gz
postgresql-02d2b694ee42a9e241d37ce67df122fff43d5bb9.zip
Update messages, comments and documentation for materialized views.
All instances of the verbiage lagging the code. Back-patch to 9.3, where materialized views were introduced.
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/comment.c2
-rw-r--r--src/backend/commands/indexcmds.c6
-rw-r--r--src/backend/commands/seclabel.c2
-rw-r--r--src/backend/commands/tablecmds.c2
-rw-r--r--src/backend/commands/typecmds.c9
-rw-r--r--src/backend/commands/vacuum.c6
6 files changed, 17 insertions, 10 deletions
diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c
index 8baf0173804..5ecc92afac6 100644
--- a/src/backend/commands/comment.c
+++ b/src/backend/commands/comment.c
@@ -98,7 +98,7 @@ CommentObject(CommentStmt *stmt)
relation->rd_rel->relkind != RELKIND_FOREIGN_TABLE)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
- errmsg("\"%s\" is not a table, view, composite type, or foreign table",
+ errmsg("\"%s\" is not a table, view, materialized view, composite type, or foreign table",
RelationGetRelationName(relation))));
break;
default:
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 9d9745e714f..ec8f248eea6 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -372,7 +372,7 @@ DefineIndex(IndexStmt *stmt,
else
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
- errmsg("\"%s\" is not a table",
+ errmsg("\"%s\" is not a table or materialized view",
RelationGetRelationName(rel))));
}
@@ -1834,8 +1834,8 @@ ReindexDatabase(const char *databaseName, bool do_system, bool do_user)
/*
* Scan pg_class to build a list of the relations we need to reindex.
*
- * We only consider plain relations here (toast rels will be processed
- * indirectly by reindex_relation).
+ * We only consider plain relations and materialized views here (toast
+ * rels will be processed indirectly by reindex_relation).
*/
relationRelation = heap_open(RelationRelationId, AccessShareLock);
scan = heap_beginscan_catalog(relationRelation, 0, NULL);
diff --git a/src/backend/commands/seclabel.c b/src/backend/commands/seclabel.c
index 7466e664654..eaf0d0dabad 100644
--- a/src/backend/commands/seclabel.c
+++ b/src/backend/commands/seclabel.c
@@ -111,7 +111,7 @@ ExecSecLabelStmt(SecLabelStmt *stmt)
relation->rd_rel->relkind != RELKIND_FOREIGN_TABLE)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
- errmsg("\"%s\" is not a table, view, composite type, or foreign table",
+ errmsg("\"%s\" is not a table, view, materialized view, composite type, or foreign table",
RelationGetRelationName(relation))));
break;
default:
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 6708725d696..f56ef28e229 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -10696,7 +10696,7 @@ RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid, Oid oldrelid,
relkind != RELKIND_FOREIGN_TABLE)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
- errmsg("\"%s\" is not a table, view, sequence, or foreign table",
+ errmsg("\"%s\" is not a table, view, materialized view, sequence, or foreign table",
rv->relname)));
ReleaseSysCache(tuple);
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index 031433d4bbb..d4a14cabff2 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -2820,7 +2820,14 @@ get_rels_with_domain(Oid domainOid, LOCKMODE lockmode)
NULL,
format_type_be(domainOid));
- /* Otherwise we can ignore views, composite types, etc */
+ /*
+ * Otherwise, we can ignore relations except those with both
+ * storage and user-chosen column types.
+ *
+ * XXX If an index-only scan could satisfy "col::some_domain" from
+ * a suitable expression index, this should also check expression
+ * index columns.
+ */
if (rel->rd_rel->relkind != RELKIND_RELATION &&
rel->rd_rel->relkind != RELKIND_MATVIEW)
{
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 68fc9c6bae9..2f2c6acb968 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -742,8 +742,8 @@ vac_update_datfrozenxid(void)
Form_pg_class classForm = (Form_pg_class) GETSTRUCT(classTup);
/*
- * Only consider heap and TOAST tables (anything else should have
- * InvalidTransactionId in relfrozenxid anyway.)
+ * Only consider relations able to hold unfrozen XIDs (anything else
+ * should have InvalidTransactionId in relfrozenxid anyway.)
*/
if (classForm->relkind != RELKIND_RELATION &&
classForm->relkind != RELKIND_MATVIEW &&
@@ -1044,7 +1044,7 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt, bool do_toast, bool for_wraparound)
}
/*
- * Check that it's a vacuumable table; we used to do this in
+ * Check that it's a vacuumable relation; we used to do this in
* get_rel_oids() but seems safer to check after we've locked the
* relation.
*/