[mythtv] More ideas on PostgreSQL support, comments welcome

Isaac Richards ijr at po.cwru.edu
Wed Sep 1 02:33:59 EDT 2004


On Tuesday 31 August 2004 05:50 am, David Härdeman wrote:
> Looking at the dbcheck code there aren't that many things which would
> need to be rewritten, and considering that amount of SQL in there, the
> wrapper should be in a pretty good shape once it manages to rewrite it
> all into PostgreSQL acceptable code.
>
> Examples of rewriting would be:
> remove any "TYPE=MyISAM" parameters
> change "SMALLINT AUTO_INCREMENT" to "SERIAL"
> remove "IF EXISTS / IF NOT EXISTS" or rewrite to something equivalent
> etc...

If it's just a few things, that sounds simple enough.  Couple simple text 
flags (ie, %AUTOINCREMENT%), that get replaced with the appropriate text 
before the query's sent.

> also some minor rewrites to MySQL SQL code (statements such as "INSERT
> INTO recordingprofiles SET name" would need to be "INSERT INTO
> recordingprofiles (name) VALUES") which shouldn't affect functionality
> at all.

Also fairly accomplished.  Only thing that'll likely be troublesome is the 
datadirect parser's temporary tables, but I'd like it if someone would 
rewrite that to just do the translation internally instead of temp tables 
anyway.

> Does this sound like a better solution?

Much, much better, thanks. =)  This sounds like something I could live with 
down the road.

Isaac


More information about the mythtv-dev mailing list