Doctrine 1

RawSql: getCountSqlQuery does not work correctly with PostgreSQL (patch provided)