• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Using PostgreSQL for MySQL app

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my company bought some years ago a web-product (I don't have the source) for computing statistics and so on. The backend used is  a mysql database. The structure is not complex (around 20 table) and few relationship among tables. Now  our company migrated to postgree and this app is the only one using mysql. We asked the product company to privide us a new version whis postgree as backend, but for different reason they don't want to do it. So I would like to know if it exists some tools/ libraries or implementing a code layer to continue to use our app as it is, but using a postgree backend, in a certain way to cheat with the app simulating a connection to mysql and converting the mysql call (select/write/update etc.) in a postgree calls.

Thanks for the help
   
 
Marshal
Posts: 28296
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just happened to run across a link to this very old blog post: Sneaking in JDBC Drivers. Heinz Kabutz knows what he's talking about but on the other hand the article is over 10 years ago and things have changed somewhat in the JDBC world since then. However the general idea is that you force your own JDBC driver to be loaded first, and then have it intercept calls from the other driver and forward those calls on to your preferred database. That could be more complicated than the example in the blog post but it may or may not be doable for what you need.
 
Saloon Keeper
Posts: 7633
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the open source P6spy library does something similar.
 
Rancher
Posts: 4801
50
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is also assuming that there are no dialect specific issues in the SQL used in the code.  That is, no SQL statements that are part of MySQL (including functions) but not part of Postgres.
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic