[mythtv] More ideas on PostgreSQL support, comments welcome

Mike Benoit ipso at snappymail.ca
Wed Sep 1 11:36:57 EDT 2004


On Wed, 2004-09-01 at 13:43 +0200, Tako Schotanus wrote:
> Isaac Richards wrote:
> > On Tuesday 31 August 2004 05:50 am, David Härdeman wrote:
> >   
> >   
> > > Does this sound like a better solution?
> > >     
> > 
> > Much, much better, thanks. =)  This sounds like something I could live with 
> > down the road.
> > 
> >   
> Are you sure? It seems to me that the moment you hit a "bump" (a MySQL
> feature that isn't easily translated to PostgresQL for example) the
> code becomes a lot more complex. Imagine having to write a small
> parser that parses the original MySQL query to make the required
> changes.
> 
> Not saying that this will happen because I don't know enough about
> PostgresQL to say how much it differs from MySQL but from experience
> in writing query builders for MySQL, MS SQL Server and Oracle I can
> tell you the differences can be quite large and sometimes require
> queries that are quite different to get the same result on the
> different systems.
> 
> All in all I think it is a bit too optimistic to think that you can
> just turn any MySQL query into any other PostgresQL query just by
> replacing some words. (why else would there be the need for query
> builders in database-vendor-agnostic products like Hibernate?).
> 
> Hopefuly I'm being too pessimistic and somebody can prove me wrong :-)
> 

As far as schema goes, your correct, I don't believe for a second that
some simple text flags can solve the issue. Hence the reason I suggested
XML Schema.

As far as general queries are concerned though, as long as you write the
queries with portability in mind, they shouldn't be an issue at all.
MySQL and PGSQL don't differ in there syntax nearly as much as say
Oracle and PGSQL. 

-- 
Mike Benoit <ipso at snappymail.ca>



More information about the mythtv-dev mailing list