Search Postgresql Archives

Re: [pgsql-advocacy] MySQL to PostgreSQL, was ENUM type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If linking it in directly via C would bring in the MySQL license, and you want to avoid that, what about one of the scripting languages such as perl or python, or possibly even ruby? Or, what about using UnixODBC to talk to MySQL.

I've written a few perl scripts when I need to convert MySQL into Postgres. Nothing formalized, I usually just recreate it each time I need to do something. My needs are typically pretty simple though, and I know what I'm converting, so it makes it easier.

I think one of the more difficult areas will be to convert unsigned fields from mysql into postgres. For smaller sizes it is possible to convert to postgres by moving one size up and using constraints to restrict numbers to be positive, and possibly within the mysql range too. But, the problem is unsigned bigint in mysql to postgresql. There's not another larger integer size that can be used that would allow the 18446744073709551615 (is that the max value?) max value available in mysql. Or am I missing something?

I think running into these would be rare, but it is something to be considered.

Greg

On Jul 27, 2005, at 7:20 PM, Christopher Kings-Lynne wrote:

So far, the checklist I can see includes:
*  Maintaining conversion scripts


What I think we need is a C program that dumps directly from MySQL into PostgreSQL sql.

ie. Take the mysqldump source code and just modify its output.

Will inherit the MySQL license though :(

Chris


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux