views:

93

answers:

2

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?

Thank you!

Thomas

+2  A: 

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).

James McNellis
+1  A: 

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.
Buckwad