One the the biggest obstacles in Drupal development for PostgreSQL is that Drupal development is MySQL based with addtional support for other databases. This means usally, all the optimizations for Drupal are for MySQL, and this can often turn to be a de-optimization for PostgreSQL.
In the time I've spent developing on Drupal and as one of the Drupal PostgreSQL maintainers, I spend most of my time fixing the PostgreSQL driver when a new feature has been implemented and doesn't work on PostgreSQL. Quite often this means making PostgreSQL work like MySQL.
I have yet to see MySQL change its driver for a PostgreSQL optimization.
In Drupal 7, DBTNG was implemented which was a new object orientated database abstraction layer which goals were to make development less database focused in the sense that using DBTNG would prevent database bias code. However, edge cases, time and time again seem to crop up and still use database specific code. To top that off, DBTNG used the PHP PDO framework which used prepared statements and implemented PDO drivers for each database type in Drupal. Unfortunately, there have been inconsistantcies between the drivers, and PostgreSQL has suffered as a result. It would seem that PDO was developed with MySQL in mind.
This week at Catalyst IT we decided to start having fortnightly code sprints to help improve the development for PostgreSQL in Drupal. The basic idea is that, with more presense from PostgreSQL people in the Drupal community, PostgreSQL development will become much stronger.
So this friday, 10th of July 2009 will be our first PostgreSQL sprint in Drupal. We'll be in #drupal IRC on freenode.net come along if you want to help out @ 4pm +1200 GMT (New Zealand time)
We'll look at the a list of issues surrounding PostgreSQL and make a push to make it work!


MySQL has a PostgreSQL mode
MySQL has a PostgreSQL mode that can get closer to mimicing Postgre. I wrote a patch for http://drupal.org/project/db_tweaks 6.x to make it do the switch during hook_boot. I know it's not ideal, but I figure it's at least one solution for MySQL devs to test their code in Postgre with reduced effort.
see also: http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html#sqlmode_post...
PostgreSQL compatible mode
PostgreSQL compatible mode for MySQL maybe something worth looking into for Drupal. I mean, Drupal is always looking for ways to get databases more insync with each other.
Nice suggestion ;)
-- edit
Actually, MySQL in Drupal 7 already runs in a mode that is quite similar to PostgreSQL mode. Also Drupal has its sights on supporting Oracle and MSSQL in the near future so we couldn't just make MySQL worth for PostgreSQL only.
The db_tweaks patch allows
The db_tweaks patch allows switching to any combination of the available alternate modes, which also happen to include Oracle and MSSQL.
There is a OLPC testfest
There is a OLPC testfest every saturday at the Southern Cross - you're welcome to join us. I've spent my time testing laconica code with postgres. I'm now testing gitorious (the AGPL softwrae that powers the site) in postgres.
Lotsa projects deal with mysql and postgresql side by side. I once contributed frequently to drupal in the same manner but found it needed a higher time commitment than I have to give, so i'm really happy that more people are getting into actually contributing postgres compatible code.
p.s. your comment captchas are awful - aren't you using mollom?
I've found that, in general,
I've found that, in general, Drupal works faily well with PostgreSQL. There are questions over performance (http://drupal.org/node/494062 & http://drupal.org/node/506208) and I've encountered quite a few modules recently that don't work with PostgreSQL. If I had time I'd help out. Alas..... :(
Post new comment