This was a fun day (beauty is in the eye of the beholder ;-).

Got through setting up my Rails test set-up to connect to postgresql next to the mysql that we already had (Rails 2.0 with Postgresql 8.1 on Ubuntu Feisty and Debian stable, which will also be the production platform). Now I can switch the application with a change of 1 line between Mysql and Postgresql (and be more sure that the development is portable between databases). A few interesting differences I saw (at first glance):

  • when using Postgresql with Rails, the rake db:migration system does not seem to automatically generate defaults for the :null => false columns (Mysql just fell back to the default values defined in schema, if a column was not filled in in the yml file). I need to test this further, but for now, I just made sure all NOT NULL columns where supplied with actual data in the files fed to rake db:load
  • in development, postgresql must in practice be run as a database superuser (e.g. "postgres"). If not, I got this error, which was quite puzzling at first ... (I had granted ALL privileges on the development database to the Rails user).


    "ActiveRecord::StatementInvalid: PGError: ERROR: permission denied:
    "RI_ConstraintTrigger_2089822" is a system trigger". ...

    After quite a bit of searching, finally found the explanation. The issue does not seem to be generally resolved (which can be an issue if for some reason you cannot have superuser privileges on the development database).

Next to that, applied copyright headers to 215 files we seem to have created over the recent weeks (finally learned some bash to automate that), got a first preview of our Drupal theme (nice work by Pieter-Jelle from www.statik.be) and got a lot of good feedback on the BRUG mailinglist about the different options for full-text search in Rails. Tomorrow, I will try to play with Postgresql tsearch2 contrib module (included in the upcoming 8.3 release) and try to report on that. Maybe someone else will check out the Sphinx alternative in parallel.

Yes, this was a good day (having fun at coding ... how many years ago has that been?)