mySQL to postgreSQL

安稳与你 提交于 2020-01-03 05:08:30

问题


We are trying to switch our application from talking to mySQL to postgres. I wished we would have some kind of a subroutine (in VB6) were I can input the mySQl SQL query and get a string out containing the appropriate postgres query.

Does anybody have a solution or is interested working with us on that?


回答1:


I would consult the "Comparison of Different SQL Implementations;" it's a most useful reference when converting queries from one RDBMS to another. WikiBooks also has a page entitled "Converting MySQL to PostgreSQL." It has a short list of the big differences between the two.

I don't know of any (free/open source) utility to translate queries, but unless you have really big, complicated queries, you shouldn't have much difficulty translating them (and, if you do have big, complicated queries, an automated tool probably won't help).




回答2:


I don't believe that there's any 'silver bullet' tool that would convert all of your queries from being MySQL to Postgres compatible.

What you do need is:

  • a reference of the differences between the two RDBMS (see @"James McNellis")
  • a good test plan for your application that will put it through the paces to ensure that your converted database backend works
  • a good reason to go through all this trouble; performance? management edict? etc.


来源:https://stackoverflow.com/questions/1618198/mysql-to-postgresql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!