Multiple database support

Jeroen Ruigrok/asmodai asmodai at
Sat Aug 30 19:02:03 UTC 2003


for the last few days I've worked hard on getting the PostgreSQL RDBMS

The problem is that a lot of Bugzilla is tailored to MySQL.  That
problem is solvable, but requires some abstraction work as well as

The current plan I have in my mind:

Make sure everything is done with ANSI SQL in mind (e.g. use ' instead
of " where ANSI SQL expects it or -- instead of #).

The script needs to have the schema definition ripped out,
it is too MySQL specific to be of any use in that script.

This needs to move to a bugzilla.mysql file.  Here we can easily place
bugzilla.pgsql, bugzilla.sybase, and next to.  Maybe a
schema subdirectory to gather them under.  You can then use the command
line tool supplied with your database system to read in this schema
definition file.

The worst part comes in making a correct abstraction layer towards the
databases.  This is essentially hairy since with PostgreSQL some queries
can be optimized in a certain way whilst MySQL might require some
different uses.
IIRC the Sybase guy(s) had a nice idea for that, need to check again.

The other solution on short term is hacking PostgreSQL support in, but
I'd rather do it the nice way.  Saves pain later on, since MySQL's speed
is achieved by its design thereby sacrificing some features most
'normal' RDBMSes do have.

So I guess I need to ask you Dave, what's allowed for 2.18 and how far
off is it?

Jeroen Ruigrok van der Werven <asmodai(at)> / asmodai
PGP fingerprint: 2D92 980E 45FE 2C28 9DB7  9D88 97E6 839B 2EAC 625B   |
The path up and down is one and the same...

More information about the developers mailing list