8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 07:23:04 +01:00

Support altering type to decfloat

This commit is contained in:
AlexPeshkoff 2017-03-03 19:55:37 +03:00
parent ccfb567bc8
commit d7b6b57fb7

View File

@ -4475,6 +4475,8 @@ void AlterDomainNode::checkUpdate(const dyn_fld& origFld, const dyn_fld& newFld)
case blr_d_float:
case blr_double:
case blr_float:
case blr_dec64:
case blr_dec128:
switch (newFld.dyn_dtype)
{
case blr_blob:
@ -4571,6 +4573,44 @@ void AlterDomainNode::checkUpdate(const dyn_fld& origFld, const dyn_fld& newFld)
}
break;
case blr_dec64:
switch (origFld.dyn_dtype)
{
case blr_short:
case blr_long:
case blr_float:
case blr_d_float:
case blr_double:
case blr_dec64:
break;
default:
// Cannot change datatype for column %s. Conversion from base type %s to base type %s is not supported.
errorCode = isc_dyn_invalid_dtype_conversion;
break;
}
break;
case blr_dec128:
switch (origFld.dyn_dtype)
{
case blr_short:
case blr_long:
case blr_int64:
case blr_float:
case blr_d_float:
case blr_double:
case blr_dec64:
case blr_dec128:
break;
default:
// Cannot change datatype for column %s. Conversion from base type %s to base type %s is not supported.
errorCode = isc_dyn_invalid_dtype_conversion;
break;
}
break;
// If the original field is a numeric field and the new field is a character field,
// is there enough space in the new field?
case blr_text: