diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/commands/matview.h | 2 | ||||
| -rw-r--r-- | src/include/utils/rel.h | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/include/commands/matview.h b/src/include/commands/matview.h index b5d52503c0d..09bc384086f 100644 --- a/src/include/commands/matview.h +++ b/src/include/commands/matview.h @@ -20,7 +20,7 @@ #include "utils/relcache.h" -extern void SetRelationIsScannable(Relation relation); +extern void SetMatViewToPopulated(Relation relation); extern void ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, ParamListInfo params, char *completionTag); diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index a4daf772e57..1fd3f67b1e4 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -83,7 +83,7 @@ typedef struct RelationData BackendId rd_backend; /* owning backend id, if temporary relation */ bool rd_islocaltemp; /* rel is a temp rel of this session */ bool rd_isnailed; /* rel is nailed in cache */ - bool rd_isscannable; /* rel can be scanned */ + bool rd_ispopulated; /* matview has query results */ bool rd_isvalid; /* relcache entry is valid */ char rd_indexvalid; /* state of rd_indexlist: 0 = not valid, 1 = * valid, 2 = temporarily forced */ @@ -407,6 +407,16 @@ typedef struct StdRdOptions ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP && \ !(relation)->rd_islocaltemp) + +/* + * RelationIsScannable + * Currently can only be false for a materialized view which has not been + * populated by its query. This is likely to get more complicated later, + * so use a macro which looks like a function. + */ +#define RelationIsScannable(relation) ((relation)->rd_ispopulated) + + /* routines in utils/cache/relcache.c */ extern void RelationIncrementReferenceCount(Relation rel); extern void RelationDecrementReferenceCount(Relation rel); |
