Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shnikd committed May 24, 2024
1 parent facf621 commit bf8feb5
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions ydb/core/tx/schemeshard/schemeshard_info_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,10 @@ TTableInfo::TAlterDataPtr TTableInfo::CreateAlterData(
if (col.HasDefaultFromSequence()) {
if (sourceColumn.PType.GetTypeId() != NScheme::NTypeIds::Int64
&& NPg::PgTypeIdFromTypeDesc(sourceColumn.PType.GetTypeDesc()) != INT8OID) {
if (sourceColumn.PType.GetTypeId() == NScheme::NTypeIds::Pg) {
errStr = Sprintf(
"Sequence value type '%s' must be equal to the column type '%s'", "pgint8",
NScheme::TypeName(sourceColumn.PType, sourceColumn.PTypeMod).c_str());
} else {
errStr = Sprintf(
"Sequence value type '%s' must be equal to the column type '%s'", "Int64",
NScheme::TypeName(sourceColumn.PType, sourceColumn.PTypeMod).c_str());
}
TString sequenceType = sourceColumn.PType.GetTypeId() == NScheme::NTypeIds::Pg ? "pgint8" : "Int64";
errStr = Sprintf(
"Sequence value type '%s' must be equal to the column type '%s'", sequenceType,
NScheme::TypeName(sourceColumn.PType, sourceColumn.PTypeMod).c_str());
return nullptr;
}
}
Expand Down

0 comments on commit bf8feb5

Please sign in to comment.