Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    Posts
    1

    PostgreSQL to MySQL conversion

    dont get me wrong - i love postgresql but sometimes, especialy on windows mysql is more practical....

    I ve seen utilities like my2pg (mysql2postgresql) but none that would do the reverse. There are some tools that come with EMS PgManager that might aqctually do it - but they work with ADO databases only.

    If you have any ideas, id love to hear them...

  2. #2
    Join Date
    Apr 2003
    Location
    Tunisia
    Posts
    192

    Thumbs up Just get the Mysql dump !!

    U can really do it easy jump dump your postgresql dump , you must eliminate all trigers and stored procedures . if you're working under windows I'll advice you a very cool tool that access both postgresql and Mysql = http://www.dbtools.com.br
    Last edited by karim2k; 05-19-03 at 10:29.
    Open up
    Take a look to my Blog http://www.rundom.com/karim2k

  3. #3
    Join Date
    May 2002
    Location
    Florida, USA
    Posts
    49
    Actually in some ways it is easier to convert from PostgreSQL to MySQL than the other way around, because it is PostgreSQL that is the "strict" one. Many values which are allowable in MySQL will not be allowed in PostgreSQL, such as dates with 0000-00-00, etc...

    So, if you just dump the basic table definitions, and remove ALL constraints (including the CHECK constraints you might use in a table def) you might be fine. (Foreign key constraints can be put back into place if you are using InnoDB, but I think they will have to use the simple REFERENCES syntax, rather than the CONSTRAINT syntax that you find in a PostgreSQL dump.

    Also, of course, you will not be able to use any views, rules, domains, schemas, functions, user-defined operators, INTERVAL datatypes, or any of the other extra PostgreSQL datatypes. (...have I dismayed you yet? )

    Oops... I just remembered; you will also have to remove all reference to PostgreSQL sequences and replace them with the auto_increment syntax in MySQL.

    Basically, if your application has any complexity, DON'T convert it to MySQL. At least do yourself the favor of using SAPDB or Firebird SQL, both of which have windows versions (SAPDB actually supports almost all the same features as PostgreSQL).

  4. #4
    Join Date
    Apr 2003
    Location
    Tunisia
    Posts
    192

    Thumbs up Shell

    I'll recommand you also to pipe a dump through out a direct dump or a text file while it has been retrived its' triggers and ...
    Open up
    Take a look to my Blog http://www.rundom.com/karim2k

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •