Thread: Re: [GENERAL] MySQL -> Postgres dump converter

Re: [GENERAL] MySQL -> Postgres dump converter

From
Bruce Momjian
Date:
Can some PostgreSQL people comment on this?  This person wrote a
MySQL->PostgreSQL converter too.  His version is at:
http://ziet.zhitomir.ua/~fonin/code


> Bruce,
> 
> On Tue, 23 Jan 2001 09:35:49 -0500 (EST)
> Bruce Momjian <pgman@candle.pha.pa.us> wrote:
> 
> > We used someone elses.  Here is a copy. Please submit any patches
> > against this version.
> 
> Sucks found:
> - doesn't handle mediumint, converts it to mediuminteger.
> The same for bigint, and probably shorting & tinyint as well.
> I don't know whether 7.1 release has such type but even if yes 
> more preferrable to keep compatibility with old releases (7.0.x doesn't have, right ?)
> - it doesn't handle mysql UNIQUE (that is keyword for unique index) inside CREATE TABLE block
> - better to create indices after data load (it does before)
> - doesn't handle UNSIGNED keyword (should a least skip it, or, at user option, convert to CHECK(field>=0))
> - doesn't convert AUTO_INCREMENT in right way, at least in my production database.
> 
> I don't see conversion of MySQL's SET and ENUM types.
> 
> Well, before do any improvements on mysql2pgsql, I want to inform you that my 
> converter has all features described above. Maybe it's easier to modify it to fit your requirements ?
> At least take a look at it.
> I don't like to do the same work twice, and this one promises to be exactly so.
> 
> Sending you my MySQL db dump which I used to play with it.
> 
> Max Rudensky.

[ Attachment, skipping... ]

[ Attachment, skipping... ]

[ Attachment, skipping... ]


--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: [GENERAL] MySQL -> Postgres dump converter

From
Thomas Lockhart
Date:
> Can some PostgreSQL people comment on this?  This person wrote a
> MySQL->PostgreSQL converter too.  His version is at:
>         http://ziet.zhitomir.ua/~fonin/code

-- THIS VERSION IS EXTREMELY BUGSOME ! USE IT ON YOUR OWN RISK !!!

Hmm. My version does not have this feature, but it could be added ;)

Seriously, I haven't looked at the differences, but there is a licensing
difference (BSD vs GPL). Someone else with experience with MySQL should
evaluate both packages.

mysql2pgsql has been used to convert SourceForge, with ~90 tables and
moderately complicated schema, but that did not include enumerated types
(done with ints at SF) and "unique" keys (done with sequences at SF)
afaicr.

> Sucks found:...

Each is a one-liner to fix in mysql2pgsql. The (nonstandard) types
mentioned weren't used in the test cases I had available. I didn't
realize that we had *any* reports of troubles or lacking features in the
existing converter, but I'll leave it up to y'all to decide if the
licensing issues and feature issues are significant.

I'm willing to provide patches to address some of the concerns, but of
course will not be able to look at the GPL'd code for hints and can only
use the information posted here to help afaik.

Comments?
                  - Thomas


Re: [GENERAL] MySQL -> Postgres dump converter

From
Bruce Momjian
Date:
Can someone look at both versions and merge the improvements into our
version?  Should be pretty easy.

> > Can some PostgreSQL people comment on this?  This person wrote a
> > MySQL->PostgreSQL converter too.  His version is at:
> >         http://ziet.zhitomir.ua/~fonin/code
> 
> -- THIS VERSION IS EXTREMELY BUGSOME ! USE IT ON YOUR OWN RISK !!!
> 
> Hmm. My version does not have this feature, but it could be added ;)
> 
> Seriously, I haven't looked at the differences, but there is a licensing
> difference (BSD vs GPL). Someone else with experience with MySQL should
> evaluate both packages.
> 
> mysql2pgsql has been used to convert SourceForge, with ~90 tables and
> moderately complicated schema, but that did not include enumerated types
> (done with ints at SF) and "unique" keys (done with sequences at SF)
> afaicr.
> 
> > Sucks found:...
> 
> Each is a one-liner to fix in mysql2pgsql. The (nonstandard) types
> mentioned weren't used in the test cases I had available. I didn't
> realize that we had *any* reports of troubles or lacking features in the
> existing converter, but I'll leave it up to y'all to decide if the
> licensing issues and feature issues are significant.
> 
> I'm willing to provide patches to address some of the concerns, but of
> course will not be able to look at the GPL'd code for hints and can only
> use the information posted here to help afaik.
> 
> Comments?
> 
>                    - Thomas
> 


--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: [GENERAL] MySQL -> Postgres dump converter

From
Max Rudensky
Date:
Guys,

Thomas said he won't look into GPL'ed code for ideas.
Well, I re-read GPL and found that it's up to author whether is to allow or not 
to use code for using in programs with another open-source license. So this isn't 
a problem - you may use my program and include code to your without limitations.
I even would prefer to change license to BSD or similar 
but I didn't find in GPL ideas about that.

Max Rudensky.

On Wed, 24 Jan 2001 11:06:12 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us> wrote:

> 
> Can someone look at both versions and merge the improvements into our
> version?  Should be pretty easy.
> 
> > > Can some PostgreSQL people comment on this?  This person wrote a
> > > MySQL->PostgreSQL converter too.  His version is at:
> > >         http://ziet.zhitomir.ua/~fonin/code
> > 
> > -- THIS VERSION IS EXTREMELY BUGSOME ! USE IT ON YOUR OWN RISK !!!
> > 
> > Hmm. My version does not have this feature, but it could be added ;)
> > 
> > Seriously, I haven't looked at the differences, but there is a licensing
> > difference (BSD vs GPL). Someone else with experience with MySQL should
> > evaluate both packages.
> > 
> > mysql2pgsql has been used to convert SourceForge, with ~90 tables and
> > moderately complicated schema, but that did not include enumerated types
> > (done with ints at SF) and "unique" keys (done with sequences at SF)
> > afaicr.
> > 
> > > Sucks found:...
> > 
> > Each is a one-liner to fix in mysql2pgsql. The (nonstandard) types
> > mentioned weren't used in the test cases I had available. I didn't
> > realize that we had *any* reports of troubles or lacking features in the
> > existing converter, but I'll leave it up to y'all to decide if the
> > licensing issues and feature issues are significant.
> > 
> > I'm willing to provide patches to address some of the concerns, but of
> > course will not be able to look at the GPL'd code for hints and can only
> > use the information posted here to help afaik.
> > 
> > Comments?
> > 
> >                    - Thomas
> > 
> 
> 
> -- 
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


Re: Re: [GENERAL] MySQL -> Postgres dump converter

From
Hannu Krosing
Date:
Max Rudensky wrote:
> 
> Guys,
> 
> Thomas said he won't look into GPL'ed code for ideas.
> Well, I re-read GPL and found that it's up to author whether is to allow or not
> to use code for using in programs with another open-source license. So this isn't
> a problem - you may use my program and include code to your without limitations.
> I even would prefer to change license to BSD or similar
> but I didn't find in GPL ideas about that.
> 

If it's all your code, then you are free to license it under any licence
you desire.

You are completely free to licence it under both GPL and BSD licenses at
the same time. 

You can even simultaneously license it under a commercial licence if you
want to ;)

What you  probably can't do is to revoke the GPL license.

-----------
Hannu


Re: Re: [GENERAL] MySQL -> Postgres dump converter

From
"Oliver Elphick"
Date:
Hannu Krosing wrote: >If it's all your code, then you are free to license it under any licence >you desire.
... >What you  probably can't do is to revoke the GPL license.

You can't revoke it from existing copies "out there", but you can from any
copies you release from now on, even of the same code..

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "Many are the afflictions of the righteous; but the      LORD delivereth him
outof them all."                                                    Psalm 34:19 
 




Re: Re: [GENERAL] MySQL -> Postgres dump converter

From
Max Rudensky
Date:
On 27 Jan 2001 11:25:56 +0100
Adrian Phillips <adrianp@powertech.no> wrote:

> >>>>> "Max" == Max Rudensky <fonin@ziet.zhitomir.ua> writes:
> 
>     Max> Guys, Thomas said he won't look into GPL'ed code for ideas.
>     Max> Well, I re-read GPL and found that it's up to author whether
>     Max> is to allow or not to use code for using in programs with
>     Max> another open-source license. So this isn't a problem - you
>     Max> may use my program and include code to your without
>     Max> limitations.  I even would prefer to change license to BSD or
>     Max> similar but I didn't find in GPL ideas about that.
> 
> If you are the original author and have not had large contributions to
> it then its just a matter of rereleasing as BSD, if on the other hand
> others have contributed then you'll have to get permission from them.
Yes, I wrote it, and I'd like to re-release it to other from GPL license.

> 
> Sincerely,
> 
> Adrian Phillips
> 
> -- 
> Your mouse has moved.
> Windows NT must be restarted for the change to take effect.
> Reboot now?  [OK]


Re: [GENERAL] MySQL -> Postgres dump converter

From
Bruce Momjian
Date:
OK, I have added this conversion scripts to CVS along with Thomas's.  If
someone wants to merge them into one, feel free to submit a patch.  I
have provided a URL to my2pg.pl to retrieve the most recent version.

The only license issue was that the bottom of the source code had a
mention referring to the GPL for more information.  I removed that
because it now clearly states it has a BSD-like license.

Thanks.

> > Can some PostgreSQL people comment on this?  This person wrote a
> > MySQL->PostgreSQL converter too.  His version is at:
> >         http://ziet.zhitomir.ua/~fonin/code
> 
> -- THIS VERSION IS EXTREMELY BUGSOME ! USE IT ON YOUR OWN RISK !!!
> 
> Hmm. My version does not have this feature, but it could be added ;)
> 
> Seriously, I haven't looked at the differences, but there is a licensing
> difference (BSD vs GPL). Someone else with experience with MySQL should
> evaluate both packages.
> 
> mysql2pgsql has been used to convert SourceForge, with ~90 tables and
> moderately complicated schema, but that did not include enumerated types
> (done with ints at SF) and "unique" keys (done with sequences at SF)
> afaicr.
> 
> > Sucks found:...
> 
> Each is a one-liner to fix in mysql2pgsql. The (nonstandard) types
> mentioned weren't used in the test cases I had available. I didn't
> realize that we had *any* reports of troubles or lacking features in the
> existing converter, but I'll leave it up to y'all to decide if the
> licensing issues and feature issues are significant.
> 
> I'm willing to provide patches to address some of the concerns, but of
> course will not be able to look at the GPL'd code for hints and can only
> use the information posted here to help afaik.
> 
> Comments?
> 
>                    - Thomas
> 


--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026