Re: postgresl for mysql? - Mailing list pgsql-general

From Listmail
Subject Re: postgresl for mysql?
Date
Msg-id op.tp4hq2srzcizji@apollo13
Whole thread Raw
In response to Re: postgresl for mysql?  (felix@crowfix.com)
List pgsql-general
>> >What will they think of next!
>> >http://krow.livejournal.com/502908.html
>> >I suppose it makes as much sense as the others, except why would you
>> >want to use mysql if the storage is in postgres?
>>
>> If you've inherited data in a postgresql database this will allow
>> you to migrate it to the industry standard database without the
>> inconvenience and downtime of a dump from postgresql and
>> a restore into mysql.
>>
>> I don't think it's a new idea - IIRC, Aprile Pazzo did something
>> similar for MySQL 3 and PG 7.something.
>
> What an interesting name!  I don't know much Italian other than what
> I've picked up from a few movies, but I think I now know what Pazzo
> means ...


    Yeah well you know mysqldump has an option "export to postgres syntax" so
you can reimport in postgres.
    I encourage you to try it one day, you'll be amazed.

mysqldump --password -d -u root immo_forum

DROP TABLE IF EXISTS `smf_topics`;
CREATE TABLE `smf_topics` (
   `ID_TOPIC` mediumint(8) unsigned NOT NULL auto_increment,
   `isSticky` tinyint(4) NOT NULL default '0',
   `ID_BOARD` smallint(5) unsigned NOT NULL default '0',
   `ID_FIRST_MSG` int(10) unsigned NOT NULL default '0',
   `ID_LAST_MSG` int(10) unsigned NOT NULL default '0',
   `ID_MEMBER_STARTED` mediumint(8) unsigned NOT NULL default '0',
   `ID_MEMBER_UPDATED` mediumint(8) unsigned NOT NULL default '0',
   `ID_POLL` mediumint(8) unsigned NOT NULL default '0',
   `numReplies` int(10) unsigned NOT NULL default '0',
   `numViews` int(10) unsigned NOT NULL default '0',
   `locked` tinyint(4) NOT NULL default '0',
   PRIMARY KEY  (`ID_TOPIC`),
   UNIQUE KEY `lastMessage` (`ID_LAST_MSG`,`ID_BOARD`),
   UNIQUE KEY `firstMessage` (`ID_FIRST_MSG`,`ID_BOARD`),
   UNIQUE KEY `poll` (`ID_POLL`,`ID_TOPIC`),
   KEY `isSticky` (`isSticky`),
   KEY `ID_BOARD` (`ID_BOARD`)
) ENGINE=MyISAM AUTO_INCREMENT=25 DEFAULT CHARSET=latin1
COLLATE=latin1_general_ci;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

mysqldump --compatible=postgres --password -d -u root immo_forum

DROP TABLE IF EXISTS "smf_topics";
CREATE TABLE "smf_topics" (
   "ID_TOPIC" mediumint(8) unsigned NOT NULL,
   "isSticky" tinyint(4) NOT NULL default '0',
   "ID_BOARD" smallint(5) unsigned NOT NULL default '0',
   "ID_FIRST_MSG" int(10) unsigned NOT NULL default '0',
   "ID_LAST_MSG" int(10) unsigned NOT NULL default '0',
   "ID_MEMBER_STARTED" mediumint(8) unsigned NOT NULL default '0',
   "ID_MEMBER_UPDATED" mediumint(8) unsigned NOT NULL default '0',
   "ID_POLL" mediumint(8) unsigned NOT NULL default '0',
   "numReplies" int(10) unsigned NOT NULL default '0',
   "numViews" int(10) unsigned NOT NULL default '0',
   "locked" tinyint(4) NOT NULL default '0',
   PRIMARY KEY  ("ID_TOPIC"),
   UNIQUE KEY "lastMessage" ("ID_LAST_MSG","ID_BOARD"),
   UNIQUE KEY "firstMessage" ("ID_FIRST_MSG","ID_BOARD"),
   UNIQUE KEY "poll" ("ID_POLL","ID_TOPIC"),
   KEY "isSticky" ("isSticky"),
   KEY "ID_BOARD" ("ID_BOARD")
);
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

    Sure looks "compatible" (but with what ?)

pgsql-general by date:

Previous
From: felix@crowfix.com
Date:
Subject: Re: postgresl for mysql?
Next
From: Listmail
Date:
Subject: Re: Tsearch2 crashes my backend, ouch !