Fix some typecasting in PgSQL Groups adapter