add materialized view feature to opengauss
This commit is contained in:
10
src/common/backend/utils/cache/relcache.cpp
vendored
10
src/common/backend/utils/cache/relcache.cpp
vendored
@ -1055,6 +1055,7 @@ static void relation_parse_rel_options(Relation relation, HeapTuple tuple)
|
||||
case RELKIND_TOASTVALUE:
|
||||
case RELKIND_INDEX:
|
||||
case RELKIND_VIEW:
|
||||
case RELKIND_MATVIEW:
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -1641,8 +1642,9 @@ static Relation relation_build_desc(Oid targetRelId, bool insertIt, bool buildke
|
||||
/*
|
||||
* if no such tuple exists, return NULL
|
||||
*/
|
||||
if (!HeapTupleIsValid(pg_class_tuple))
|
||||
if (!HeapTupleIsValid(pg_class_tuple)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* get information from the pg_class_tuple
|
||||
@ -2424,6 +2426,9 @@ static void formr_desc(const char* relationName, Oid relationReltype, bool issha
|
||||
/* formr_desc is used only for permanent relations */
|
||||
relation->rd_rel->relpersistence = RELPERSISTENCE_PERMANENT;
|
||||
|
||||
/* ... and they're always populated, too */
|
||||
relation->relispopulated = true;
|
||||
|
||||
relation->rd_rel->relpages = 0;
|
||||
relation->rd_rel->reltuples = 0;
|
||||
relation->rd_rel->relallvisible = 0;
|
||||
@ -3724,6 +3729,9 @@ Relation RelationBuildLocalRelation(const char* relname, Oid relnamespace, Tuple
|
||||
break;
|
||||
}
|
||||
|
||||
/* we keep this flag and set it true for all relations here, which may be useful for future */
|
||||
rel->relispopulated = true;
|
||||
|
||||
/*
|
||||
* Insert relation physical and logical identifiers (OIDs) into the right
|
||||
* places. For a mapped relation, we set relfilenode to zero and rely on
|
||||
|
||||
Reference in New Issue
Block a user