Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql转pg的表结构问题汇总 #124

Open
constzl opened this issue May 8, 2019 · 1 comment
Open

mysql转pg的表结构问题汇总 #124

constzl opened this issue May 8, 2019 · 1 comment

Comments

@constzl
Copy link
Contributor

constzl commented May 8, 2019

  1. 表字段的备注全都丢了:其实业务人员很需要。
  2. 字符类型,全部简单粗暴的转为text
  3. int类型:只有int4或int8
  4. decimal类型:转换为numric后的精度全部丢失
  5. 丢失了主键或唯一约束,只有distributed by ( )语句。
  6. mysql的timestamp类型转换后,还是without time zone类型,这会导致之前上的dts出现问题
  7. 没有带上原mysql库的库名:也就是dbname.table,转换后,只有表名。其实可以考虑带上库名。因为在pg里面创建schema的时候,一般都会跟源库保持一致。
@wjzeng
Copy link
Member

wjzeng commented Jun 15, 2020

感谢你的反馈。
问题 1 5 是目前欠缺的,是明确的需求
问题 2 3 4 都是数据类型的问题,如果你有具体的做法上的建议,欢迎反馈给我。
问题 6 在详细调查 timestamp 兼容性后开发。
问题 7 考虑 dbname 映射到 schema,不过这不是特别通用的需求,考虑做成开关。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants