http://pascal.scheffers.net/openacs/pgupdate/
Basically, you probably only need to re-load www/doc/sql/postgres.sql.