Tag: postgresql



SiteBar looks useful. And it has a firefox extension…

But their server software needs MySQL. I like PostgreSQL. Bah. That sounds like work. Thankfully, their database abstraction looks reasonably clean. Oh well, here we go.

Update: no, the mysqlisms are too deeply embedded. Or at least, I don’t know how to sensibly deal with assumptions about mysql_insert_id that aren’t true in a PostgreSQL world.

X debug trick

A useful tip I found in work today for debugging deeply embedded stuff. I was in the middle of some Perl tests talking to a PostgreSQL database. The database was created at the start of the test, and dropped at the end of the test, so there was no oppurtunity to see inside it whilst the test was running.

I remembered seeing an X trick in postfix and realised I could do something similiar. So I came up with this.

system "xterm -e psql -d $ENV{DBNAME}";

I put that in my function where I wanted to examine the database. When the line ran, I got a nice new window all ready for me to inspect that database. Needless to say, it quickly revealed the problem in my code…

PostgreSQL Upgrade

I’ve just upgraded to PostgreSQL 8.0, which as expected, didn’t go entirely smoothly. The config file format has changed a bit, although ediff soon took care of that. The dump-and-restore rigmarole is still there, but then that’s what nightly backups are for.

The main trouble was that I had been playing with SSL certificates some time ago and that’s changed a little bit in 8.0 (hopefully due to my prompting). Turning that off made things go better. It’s not a problem because the new default is to listen to the localhost interface only instead of all IP addresses.

What’s nice is that wordpress-pg appears to work without any problems. I wasn’t expecting any, but it’s always pleasant when it works out like that.

Anyway, now that it’s there, I can start playing with it to see what’s changed. Even though I don’t use the database much at home, it’s all good experience.