revert xstore deferrable constraints

This commit is contained in:
徐达标
2024-09-06 17:13:31 +08:00
parent c880e009bf
commit 08ac80d043
2 changed files with 19 additions and 0 deletions

View File

@ -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 &&

View File

@ -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