I got Wakaba working with PostgreSQL. It took a little bit of fiddling with the table structure, but the changes are worthwhile on the whole, I believe:
There's still a few more things that should be done, particularly rewriting the COUNT(*)
queries as Postgres doesn't even try to optimize them, and modifying the table init check to convert the data from an older version. It's a start though, and everything seems to function.