修复缺陷I6FG7Q:alter table 提示could not find cast from 3904 to 3831
This commit is contained in:
@ -4187,7 +4187,7 @@ CAUSE: "invalid"
|
||||
ACTION: "invalid"
|
||||
|
||||
|
||||
GAUSS-00773: "could not find cast from %u to %u"
|
||||
GAUSS-00773: "could not find cast from %s to %s"
|
||||
SQLSTATE: XX000
|
||||
CAUSE: "invalid"
|
||||
ACTION: "invalid"
|
||||
|
@ -14812,7 +14812,7 @@ static CoercionPathType findFkeyCast(Oid targetTypeId, Oid sourceTypeId, Oid* fu
|
||||
/* A previously-relied-upon cast is now gone. */
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_CHARACTER_VALUE_FOR_CAST),
|
||||
errmsg("could not find cast from %u to %u", sourceTypeId, targetTypeId)));
|
||||
errmsg("could not find cast from %s to %s", format_type_be(sourceTypeId), format_type_be(targetTypeId))));
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -2863,3 +2863,8 @@ Options: orientation=row, compression=no
|
||||
|
||||
drop table test_unique;
|
||||
\c postgres
|
||||
create table t_alter_type(c0 int4range Unique, foreign key(c0) references t_alter_type(c0));
|
||||
NOTICE: CREATE TABLE / UNIQUE will create implicit index "t_alter_type_c0_key" for table "t_alter_type"
|
||||
alter table t_alter_type alter c0 set data type int4range;
|
||||
ERROR: could not find cast from int4range to anyrange
|
||||
drop table t_alter_type;
|
||||
|
@ -1376,4 +1376,8 @@ alter table test_unique add unique using btree(f31) comment 'unique index' using
|
||||
\d+ test_unique
|
||||
drop table test_unique;
|
||||
|
||||
\c postgres
|
||||
\c postgres
|
||||
|
||||
create table t_alter_type(c0 int4range Unique, foreign key(c0) references t_alter_type(c0));
|
||||
alter table t_alter_type alter c0 set data type int4range;
|
||||
drop table t_alter_type;
|
||||
|
Reference in New Issue
Block a user