Search Postgresql Archives

Re: Porting MySQL PHP to Postgres

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shaun Clements wrote:
RE: Porting MySQL PHP to Postgres

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux