Multiple database support

Jeroen Ruigrok/asmodai asmodai at wxs.nl
Mon Sep 1 06:46:57 UTC 2003


-On [20030901 03:52], David Miller (justdave at syndicomm.com) wrote:
>On 8/30/2003 9:02 PM +0200, Jeroen Ruigrok/asmodai wrote:
>Did you start over, or did you update what RedHat already did (from 2.17.1)
>up to the tip?

I started over.

Some of the patches strike me as being kind of unclean.  Especially on
the schema side of things it's best to make use of datatypes available
on that particular RDBMS.

>It would be cool to describe each table as a hash in perl code, and provide
>the column names, abstract types, and even some DB-specific data (with a
>hash key prefixed with the name of the DB it's for).  The database-specific
>code for each database could then read from that hash, do what it needs to
>for it to work on that Database, and go do it.

Hmm, that could work yeah.  Especially since the MySQL code uses an
tinyint for what would normally just be a boolean datatype, which
PostgreSQL supports.  This would, given its function and use, be more
correct than MySQL's tinyint.  So I could understand something like:

"isprivate" -> "boolean"

which would map to tinyint on MySQL and boolean on PostgreSQL, PL/SQL
supports a boolean as well (need to ask my DBAs if this is a wrapper
datatype), and Sybase probably uses an smallint.

This might seem pedantic to enforce it like this, but people should not
forget that the RDBMSes other than MySQL means a whole different
ballgame when it comes to thinking out the strategy with regards to the
schema and associated queries.
You have to keep in mind that the optimizers might take advantage of the
specific datatypes.

>It may even be possible to describe necessary changes that way, too, but
>that might be more difficult (for the seamless upgrade stuff).

Which reminds me, the schema's use of names isn't quite consistent,
sometimes you see isblah, then is_blah, etc.  Is there any desire to
make the entire schema consistent?  It would ease of administration,
given you're not constantly thinking: "Was it isprivate or is_private?"

(I am _very_ pedantic when it comes to these sort of things, just part
of my real life experience and, *cough*, 'friendly' reminders from the
people who are true specialists in that area. ;) )

>Yeah, I'm still intending to use something like that here.  It seemed to
>work very well at keeping the Sybase port running on both Sybase and MySQL
>simultaneously.

D'oh, I forgot that it was your work.  I'll try to see if I can cast it
to pgsql quickly.

>> So I guess I need to ask you Dave, what's allowed for 2.18 and how far
>> off is it?
>
>What's allowed depends on the ideas people have. :)  I attempted to post
>enough details of the abstraction system on the Sybase bug that someone
>with time could run with it.

I'll see what I can do to make that work with PostgreSQL.

>I heard a rumor that Dave Lawrence at RedHat was going to get paid time to
>work on completing the Postgres port they've already done sometime soon, so
>it can be merged with the trunk.  I don't know if that's true or not though.

I won't build on rumours. :)

>Time frame for 2.18?  As stated many times before, "whenever it's done."
>The milestone goals on the website were recently updated.  When the stuff
>in the "have to have" portion of that list gets completed, we release.

Ah ok.  I understand.

By the way, bugzilla.mozilla.org has been denying HTTP requests for me
the last few days.  Going to mecha.bugzilla.org works though.
Hmm, just tested it again, Opera 7 doesn't mind, Firebird 0.6 gives me a
connection refused.  That's odd.

-- 
Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai
PGP fingerprint: 2D92 980E 45FE 2C28 9DB7  9D88 97E6 839B 2EAC 625B
http://www.tendra.org/   | http://www.in-nomine.org/~asmodai/diary/
When you seek it, you cannot find it...



More information about the developers mailing list