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

2001-02-10 Thread Bruce Momjian

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
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026



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

2001-02-07 Thread Bruce Momjian

 On Sun, 28 Jan 2001 07:57:43 +
 "Oliver Elphick" [EMAIL PROTECTED] wrote:
 
  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..

 Thanks. I'll release it under BSD - in few days.

OK, his conversion tool has been release under a BSD license.  Can
someone review his and Thomas's and merge them?   You can download it
from:

http://ziet.zhitomir.ua/~fonin/code

Thanks.



-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026



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

2001-01-28 Thread Max Rudensky

On 27 Jan 2001 11:25:56 +0100
Adrian Phillips [EMAIL PROTECTED] wrote:

  "Max" == Max Rudensky [EMAIL PROTECTED] 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: [HACKERS] Re: [GENERAL] MySQL - Postgres dump converter

2001-01-27 Thread Hannu Krosing

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: [HACKERS] Re: [GENERAL] MySQL - Postgres dump converter

2001-01-27 Thread Oliver Elphick

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[EMAIL PROTECTED]
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 out of them all." 
Psalm 34:19 





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

2001-01-26 Thread Max Rudensky

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 [EMAIL PROTECTED] 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
   [EMAIL PROTECTED]   |  (610) 853-3000
   +  If your life is a hard drive, |  830 Blythe Avenue
   +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026



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

2001-01-24 Thread Bruce Momjian


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
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026



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

2001-01-23 Thread Bruce Momjian


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 [EMAIL PROTECTED] 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
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026



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

2001-01-23 Thread Thomas Lockhart

 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



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

2001-01-23 Thread Max Rudensky

Bruce,

On Tue, 23 Jan 2001 09:35:49 -0500 (EST)
Bruce Momjian [EMAIL PROTECTED] 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.

 test.init
 test.mysql
 test.sql92