Do you know why so many (mostly PHP) developers have problems porting their applications to PostgreSQL?

Because PostgreSQL actually enforces constraints on the data.

MySQL, which can even have values that are NULL and NOT NULL at the same time (yes, this is not a joke, Details are found here), is not particularly good at that. And people get used to all kind of stuff they can throw at MySQL and it will try to make the best out of it, instead of forcing the programmer to correctly specify what he intends to do.

That’s the reason why I so far have been avoiding any application which only support MySQL: If it only supports MySQL, it probably means they can’t get it to work with anything else. And that is a really bad sign.

I was looking for some cheap WebCMS. The big names are Typo3, Joomla, Drupal. Joomla is MySQL only. Plus it doesn’t support iCalendar. Typo3, I’ve had had a look on that one before, it was ugly, used things like line numbers for layouting. And Drupal was pretty much the only one I heard not just negative things about (I was mostly talking to tech guys, not “web designers”). So I thought I’d give it a try. With PostgreSQL, since I want a consistent database.

Drupal (6.1) installation with PostgreSQL worked fine. Then I tried installing the add-on modules I was most interested in: Date and Event; since the web site I’m considering it for will be mostly around organizing events, so I do need some solid calendaring functions.

Apparently, the Date module of Drupal currently does not support PostgreSQL, it failed creating or filling it’s timezone table in the database.

How come that pretty much all PHP stuff is broken on so many levels? I figure the Drupal people have spent a lot of time in getting their core working well, and I also believe that the cores of the other systems might all be okay. But when it comes to extension modules, it seems to be as bad as ever before with PHP…

Some people might just say “well, run MySQL, and it would be working”.

If a module isn’t capable of storing timezone information in other SQL databases, how can it be of good code quality?

(Yes, I know that I’m not being entirely fair. Picking on Drupal or even on the not yet finished Date extension is probably not really fair. But you have to admit that an application which can work with multiple databases probably has received more attention to doing database things the proper way, right?

The Date module is not yet “released”. I’m not saying it’s worthless, it just does not work for me yet. And it actually backs my first claim: working support for other SQL databases is a sign of code maturity.

And in most (if not all) PHP web applications, extension modules with their varying code quality are known for introducing security issues again and again.)