[mythtv] More ideas on PostgreSQL support, comments welcome

Ronald van Eijck ronald at vaneijck.com
Tue Aug 31 00:21:12 EDT 2004


Hi all,

Isaac wrote:
> On Monday 30 August 2004 04:59 pm, David Härdeman wrote:
> > Fine, so don't update the psql file, just update the mysql one and I'm
> > sure that someone that cares for postgresql can update the corresponding
> > pgsql soon thereafter. Worst case scenario is that PostgreSQL support is
> > broken for a period of time. Would this be an acceptable compromise?
>
> No, I wouldn't really consider that's acceptable at all.  What happens
when I
> want to make a release and the postgresql support isn't updated?

To support multiple databases it is better to have some sort of common
definition for tables and queries and a 'driver' for the database that
translates this to the specific sql dialect.

I do al lot of java projects and we use the hibernate framework in
some projects. It is a generic object-relational wrapper and supports
lots of different databases. There must be something like that for
QT / C++ out there. If not the first step should be a set of support
methods to perform queries, updates & deletes in an sql independent
way.

> > >I will not add support for other databases if it makes the current
> > > internal database usage any harder to use.  I see absolutely no
benefit
> > > in doing that.
> >
> > I fail to see how my suggestion would make internal database usage
> > harder? Is updating a separate file with SQL queries harder than
updating
> > a .cpp file with SQL queries?
>
> It's not harder, but it's a large step backwards, IMO.  It's one more
thing to
> keep track of, and one more thing that can possibly break.
>
> If multiple databases can't be supported without extra work for me down
the
> road, then there won't be support for multiple databases.  I don't see the
> benefit in it.

There will always be extra work but this should NOT be in the form of
writing every sql statement multiple times.

C'ya,

    Ronald



More information about the mythtv-dev mailing list