Postgrsql-related fixes

<del>- Prevent backslash from tripping logging with PostgreSQL fixes habari/habari#527</del>
- Fix comments overview query on admin dashboard for PostgreSQL fixes habari/habari#384 - Tested with postgresql and sqlite