docker 使用pgloader 迁移mysql到pgsql?

pgloader mysql://root:123qwe@host.docker.internal/project_test_1  postgresql://postgres@localhost/postgres   此时mysql的tinyint字段会被自动转换成smallint  如何添加cast参数 使tinyint转换成bool呢?显示全部

pgloader mysql://root:123qwe@host.docker.internal/project_test_1  postgresql://postgres@localhost/postgres   此时mysql的tinyint字段会被自动转换成smallint  如何添加cast参数 使tinyint转换成bool呢?

收起
参与7

查看其它 1 个回答沈天真的回答

沈天真沈天真  售前支持 , IPS

可以使用 pgloader  的转换函数
https://pgloader.readthedocs.io/en/latest/ref/transforms.html

  • tinyint-to-boolean

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_’.

硬件生产 · 2022-01-14
浏览1109

回答者

沈天真
售前支持IPS
擅长领域: 服务器云计算存储

沈天真 最近回答过的问题

回答状态

  • 发布时间:2022-01-14
  • 关注会员:3 人
  • 回答浏览:1109
  • X社区推广