PostgreSQL转换为Mysql

PostgreSQL转换为Mysql

1,将输出的PostgreSql语句输出的表结构和文本内容放在word上边,然后在使用Notepad++打开或者直接打开word文本
  (1)将“public".  字段替换为空
  (2)删除 nextval() 函数信息
  (3)将COLLATE 替换为空
  (4)将“”字符替换为mysql识别的·字符(~号电脑Esc下面的字符)
  (5)将int4 替换为int(11), int2 替换为int(11)
  (6)将default替换为空
  (7)将创建表加上唯一  PRIMARY KEY (`表唯一ID`)
  (8)将with(oids = false)替换为 ENGINE=InnoDB  CHARSET=utf8;
    (9) timestamp(6) 修改为datetime
    (10) 修改创建 index 语句;create index `idx_name` on `table` using btree(`col_name`); 修改为 aleter table `table` add index `idx_name` (`col_name`) using btree'
原文地址:https://www.cnblogs.com/stono/p/12188980.html