mirror of https://github.com/citusdata/citus.git
fix alter_distributed_table
parent
3341e3d9dc
commit
407a0cdadc
|
|
@ -2125,6 +2125,23 @@ CheckAlterDistributedTableConversionParameters(TableConversionState *con)
|
||||||
"distribution column is different than %s",
|
"distribution column is different than %s",
|
||||||
con->colocateWith, con->relationName)));
|
con->colocateWith, con->relationName)));
|
||||||
}
|
}
|
||||||
|
else if (con->distributionColumn &&
|
||||||
|
colocateWithPartKey->varcollid != con->distributionKey->varcollid)
|
||||||
|
{
|
||||||
|
ereport(ERROR, (errmsg("cannot colocate with %s and change distribution "
|
||||||
|
"column to %s because collation of column %s is "
|
||||||
|
"different then the distribution column of the %s",
|
||||||
|
con->colocateWith, con->distributionColumn,
|
||||||
|
con->distributionColumn, con->colocateWith)));
|
||||||
|
}
|
||||||
|
else if (!con->distributionColumn &&
|
||||||
|
colocateWithPartKey->varcollid !=
|
||||||
|
con->originalDistributionKey->varcollid)
|
||||||
|
{
|
||||||
|
ereport(ERROR, (errmsg("cannot colocate with %s because collation of its "
|
||||||
|
"distribution column is different than %s",
|
||||||
|
con->colocateWith, con->relationName)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!con->suppressNoticeMessages)
|
if (!con->suppressNoticeMessages)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue