Re: PHP Postgre-MySql call redirector

From: Chris Travers <chris(at)travelamericas(dot)com>
To: Brandon <brami(at)gmx(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PHP Postgre-MySql call redirector
Date: 2004-08-15 18:42:51
Message-ID: 411FAEAB.1050308@travelamericas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Brandon wrote:

>Is there a call redirector available that redirects the calls to the
>PHP MySql API (mysql_connect etc.) to a Postgre database? This would
>be very usefull since a lot of PHP Scripts are coded for MySQL. I
>think for most PHP scripts this would work out since the SQL syntax
>from PostgreSQL and MySQL are very similar.
>
>

Hi Brandon;

I am not aware of any such module. It could be written but would not
likely be portable as there is no way I know of to redefine an existing
function. I.e. for a call redirector to work, the MySQL extensions
could not be loaded. This was current as of PHP4.

My response was to write an API which was similar to that used by MySQL
and use their syntax and record set handling rules, so that you could
run the script though a sed script to replace one set of API names with
another. Timestamp handling is still a problem though since MySQL
varies from the standard here.

Best Wishes,
Chris travers
Metatron Technology Consulting

>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Poole 2004-08-15 18:45:12 Re: PgSQL 8.0.0 - contributed: problem compiling
Previous Message Tom Lane 2004-08-15 18:39:56 Re: boolean function return values