Re: postgresl for mysql?

From: Listmail <lists(at)peufeu(dot)com>
To: Postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgresl for mysql?
Date: 2007-04-01 20:55:40
Message-ID: op.tp4hq2srzcizji@apollo13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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=(at)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=(at)OLD_TIME_ZONE */;

Sure looks "compatible" (but with what ?)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Listmail 2007-04-01 20:56:42 Re: Tsearch2 crashes my backend, ouch !
Previous Message felix 2007-04-01 20:06:30 Re: postgresl for mysql?