diff --git a/src/gausskernel/optimizer/commands/indexcmds.cpp b/src/gausskernel/optimizer/commands/indexcmds.cpp index 07bd4f351..a7c6bde96 100644 --- a/src/gausskernel/optimizer/commands/indexcmds.cpp +++ b/src/gausskernel/optimizer/commands/indexcmds.cpp @@ -839,6 +839,15 @@ ObjectAddress DefineIndex(Oid relationId, IndexStmt* stmt, Oid indexRelationId, if (has_dedup_opt) { elog(ERROR, "Index deduplication is not supported for ustore."); } + if (stmt->deferrable == true) { + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmodule(MOD_EXECUTOR), + errmsg("Ustore table does not support to set deferrable."), + errdetail("N/A"), + errcause("feature not supported"), + erraction("check constraints of columns"))); + } } if (strcmp(stmt->accessMethod, "ubtree") == 0 && diff --git a/src/gausskernel/optimizer/commands/tablecmds.cpp b/src/gausskernel/optimizer/commands/tablecmds.cpp index 88e3c4214..779ce0c8f 100755 --- a/src/gausskernel/optimizer/commands/tablecmds.cpp +++ b/src/gausskernel/optimizer/commands/tablecmds.cpp @@ -14936,6 +14936,16 @@ static ObjectAddress ATExecAddConstraint(List** wqueue, AlteredTableInfo* tab, R (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("column store unsupport constraint \"%s\"", GetConstraintType(newConstraint->contype)))); + if (rel->rd_tam_ops == TableAmUstore && newConstraint->deferrable == true) { + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmodule(MOD_COMMAND), + errmsg("Ustore table does not support to set deferrable."), + errdetail("N/A"), + errcause("feature not supported"), + erraction("check constraints of columns"))); + } + /* * Currently, we only expect to see CONSTR_CHECK and CONSTR_FOREIGN nodes * arriving here (see the preprocessing done in parse_utilcmd.c). Use a