Remove duplication in PostgreSQLRepository