the logger was throwing werid errors

I'd rather focus on using ROM instead of messing about with the database setup
use proper PostgreSQL functions