add materialized view feature to opengauss

This commit is contained in:
sqyyeah
2020-08-17 11:48:18 +08:00
parent 3eade03f9c
commit d5337ceca7
120 changed files with 3796 additions and 823 deletions

View File

@ -1866,7 +1866,7 @@ TupleTableSlot* ExecModifyTable(ModifyTableState* node)
bool isNull = false;
relkind = result_rel_info->ri_RelationDesc->rd_rel->relkind;
if (relkind == RELKIND_RELATION || relkind == RELKIND_SEQUENCE) {
if (relkind == RELKIND_RELATION || relkind == RELKIND_SEQUENCE || relkind == RELKIND_MATVIEW) {
datum = ExecGetJunkAttribute(slot, junk_filter->jf_junkAttNo, &isNull);
/* shouldn't ever get a null result... */
if (isNull) {
@ -2404,7 +2404,7 @@ ModifyTableState* ExecInitModifyTable(ModifyTable* node, EState* estate, int efl
char relkind;
relkind = result_rel_info->ri_RelationDesc->rd_rel->relkind;
if (relkind == RELKIND_RELATION) {
if (relkind == RELKIND_RELATION || relkind == RELKIND_MATVIEW) {
j->jf_junkAttNo = ExecFindJunkAttribute(j, "ctid");
if (!AttributeNumberIsValid(j->jf_junkAttNo)) {
ereport(ERROR,