Fix to avoid a org.postgresql.util.PSQLException: Can't infer the SQL type ... exception with custom types.