pgloader mysql://root:123qwe@host.docker.internal/project_test_1 postgresql://postgres@localhost/postgres 此时mysql的tinyint字段会被自动转换成smallint 如何添加cast参数 使tinyint转换成bool呢?
可以使用 pgloader 的转换函数
https://pgloader.readthedocs.io/en/latest/ref/transforms.html
As MySQL lacks a proper boolean type, tinyint is often used to implement that. This function transforms 0 to ‘false’ and anything else to _‘true_’.
收起