[mythtv] More ideas on PostgreSQL support, comments welcome

Isaac Richards ijr at po.cwru.edu
Wed Sep 1 02:25:27 EDT 2004


On Wednesday 01 September 2004 12:30 am, Mike Benoit wrote:
> On Tue, 2004-08-31 at 22:08 -0400, Isaac Richards wrote:
> This is what David Härdeman <david at 2gen.com> wrote:
> >>>Create a lightweight DB wrapper that will accept MySQL queries and
> >>>either pass them directly to the database (in case it's a MySQL
> >>>backend)
> >>>or do some dynamic rewriting and then pass it to the backend (if
> >>>it's anything but a MySQL backend).
>
> Queries, dynamic, rewriting, all in the same sentence. Did I read that
> wrong?

He was talking about table creation.

> > > The hardest part about supporting multiple databases is almost always
> > > schema creation/updating. Updating usually being the most difficult. A
> > > possible solution is to use the XMLSchema (http://adodb-
> > > xmlschema.sourceforge.net/docs/ ) library that comes with ADODB.
> >
> > No additional dependencies.
>
> So, to summarize this thread so far:
>
> - You don't want to have to write duplicate SQL queries, even if its
> just for creating/modifying the schema

Right.  That would be quite broken.

> - You won't let anyone else take responsibility for looking after
> alternate database code.

If someone who had a history of contributing to this project wanted to take it 
on, then that would be fine.  If it's someone who's never contributed before, 
I can't know that they _will_ take responsibility for looking after it.

In case you hadn't noticed, the DB is an integral part of using Myth - if 
that's broken, then _everything_ is broken.  I simply can't have a user 
decide to use Postgres, then get screwed over because I put out a new version 
and no-one's bothered to update the postgres support.

> - You don't want supporting more then one database to be any extra work
> whatsoever.

You think it's fair to make me commit to doing extra work every time someone 
wants to change the db schema for a feature I have absolutely no use for?

> - You don't want to use any _already existing_ tools (because they do
> exist) that might help make the process less work. Because you don't
> want to add dependencies, even if the tool only needs to be run ONCE per
> schema change, and have the resulting SQL output saved which could then
> be run on users machines. Thereby NOT requiring additional dependencies
> for users.

It's an additional dependency for anyone wanting to code, no? It's an 
additional thing that can break.  I already said that I don't want a 
separately distributed file for schema creation, did you not see that?

However, I may consider this, if an appropriate tool is available.  That 
adodb-xmlschema thing looks to be utterly unuseable, though - the XML format 
is horrible, and the upgrade procedure looks nasty.

> Short of re-inventing the wheel (writing a MythTV specific library that
> magically converts MySQL table schema's to PostgreSQL), I get the
> impression your not interested in even entertaining the option of
> supporting more then just MySQL?

Sure I am, as long as it's done without making my work any more difficult.  If 
it can't be, then I don't see the use for it.  I thought I've made this 
clear.

Isaac


More information about the mythtv-dev mailing list