Re: [HACKERS] Where do they find the time??? GreatBridge

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Justin Clift <justin(at)postgresql(dot)org>
Cc: Charles Tassell <ctassell(at)isn(dot)net>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, pgsql-general(at)postgresql(dot)org
Subject: Re: [HACKERS] Where do they find the time??? GreatBridge
Date: 2001-09-17 05:40:41
Message-ID: 20010917154041.A22703@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, Sep 17, 2001 at 02:51:10PM +1000, Justin Clift wrote:
> I wonder if it would really be possible to do?

Well, it seems to me you could do it at serveral levels:

1. Have a proxy running on whatever port MySQL uses that simply translates
the queries coming in and emulates the protocol. Problem is, you'd have to
possibly translate function names, etc. I don't think there'd be any real
SQL constructs they support be we don't. You can always ignore anything not
supported unless it really has a material effect.

2. Support multiple grammers, configurable by database. Then you could
support:

CREATE DATABASE dummy EMULATING mysql;

Create a table of all the functions in mysql with a loadable module that
defines them all. Would make lots of people *really* happy. You could
emulate every database under the sun. That'd be an excellent marketing
point.

"PostgreSQL is much more powerful then MySQL. It even has an emulation mode
so all your existing MySQL programs will run without changes."

The thing is, I don't even think this would be too hard to do. A bit of time
to setup maybe. You could define a function pg_parser which is the parser
for this database.

Oh, you'd also have to support different client communication protocols. I
have no idea how hard that would be.

Would also need to provide a per connection override so that psql and
pg_dump could be used without having to rewrite them.

3. Similar to proxy but built into the database. Don't like this. Too many
levels of parsing. Seems the wrong place.

4. Supply a MySQL perl module that does the converting. Maybe be easy to do
but only covers one application at a time. More robust as a separate
application but would probably have to do complete parsing to give complete
support.

Probably others but I can't think of any right now.

--
Martijn van Oosterhout <kleptog(at)svana(dot)org>
http://svana.org/kleptog/
> Magnetism, electricity and motion are like a three-for-two special offer:
> if you have two of them, the third one comes free.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rums 2001-09-17 06:00:27 CD-RW Scheduled Database Backup...
Previous Message Chris 2001-09-17 04:58:56 interfacing multiple db's (was Re: Where do they find the time??? GreatBridge)

Browse pgsql-hackers by date

  From Date Subject
Next Message Rums Dabs 2001-09-17 06:01:16 CD-RW Scheduled Database Backup...
Previous Message kevin 2001-09-17 05:36:28 Re: how to extend the catalog?