!6254 【回合6.0.0】disable deferrable constraints
Merge pull request !6254 from 徐达标/cherry-pick-1725687519
This commit is contained in:
@ -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 &&
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user