From: | Matt Kynaston <matt(at)kynx(dot)org> |
---|---|
To: | Shaun Clements <ShaunC(at)relyant(dot)co(dot)za> |
Cc: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Porting MySQL PHP to Postgres |
Date: | 2005-02-21 11:38:45 |
Message-ID: | 4219C845.6080401@kynx.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Shaun Clements wrote:
> I assumed as much. I was hoping there was a tool available which
> someone had used and (or) what kind of stumbling blocks to run into.
>
There's useful articles at:
http://www.sitepoint.com/article/site-mysql-postgresql-1/2
http://www.raditha.com/postgres/
and a mysql2pgsql script (that I've never tried) at:
http://www.raditha.com/blog/archives/000497.html
In the PHP code itself, mysql_insert_id() is a big one with no direct
equivalent.
Since it's an intranet app, the overhead of using one of the abstraction
layers like DB or MDB might not be a huge problem. It'd make stuff like
the above easier:
http://pear.php.net/packages.php?catpid=7&catname=Database
Or if you're on PHP5 and feel like catching a few bugs, check out PDO:
http://pecl.php.net/package/PDO
In the SQL, watch out for GROUP BYs without all column names used in the
SELECT specified and the syntax of LIMIT. And I'm sure there's other
gotchas I can't remember. But on the whole you should find Postgres is
able to do far more things (like UNION, unavail in older version of
MySQL): if you've got the time it'd probably pay to rethink some of the
brain-dead things That Other RDBMS (TM) makes you do.
Enjoy!
Matt
From | Date | Subject | |
---|---|---|---|
Next Message | mef | 2005-02-21 11:42:59 | Tracing of tables deleting - how? |
Previous Message | Martín Marqués | 2005-02-21 11:30:46 | Re: change user password |