同步表时出现了一个错误:"Unknown colType: regclass" #1377
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1377
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
之前一直都是没有问题的,在使用了pathman这个pg插件后engine.Sync2()这个方法会报一个"Unknown colType: regclass"的错误,看了一下pathman这个插件会在我们的数据库下创建好几张表,其中有一张表的列类型是"regclass",按道理这个表不是我要同步的表,不应该报错才对
追踪发现是dialect_postgres.go文件的1041行报的错,此时col.SQLType.Name是"REGCLASS"
然而core.SqlTypes这个map里是没有这个键的,因此就报错了,直接return
这个要怎么改呢?
if _, ok := core.SqlTypes[col.SQLType.Name]; !ok { return nil, nil, fmt.Errorf("Unknown colType: %v", dataType) }
I think we should support user-define column types.
Thank you for your attention
I found someone saying that regclass is an alias for oid datatype,but I don't know what this means.
遇到同样的问题,急需解决,为了避免这个错误去掉同步后遇到了更大的升级失败问题。有解决deadline吗?