getisnull (PGresult)

    /*
     * call-seq:
     *    res.getisnull(tuple_position, field_position) -> boolean
     *
     * Returns +true+ if the specified value is +nil+; +false+ otherwise.
     */
    static VALUE
    pgresult_getisnull(VALUE self, VALUE tup_num, VALUE field_num)
    {
            PGresult *result;
            int i = NUM2INT(tup_num);
            int j = NUM2INT(field_num);

            result = get_pgresult(self);
            if (i < 0 || i >= PQntuples(result)) {
                    rb_raise(rb_eArgError,"invalid tuple number %d", i);
            }
            if (j < 0 || j >= PQnfields(result)) {
                    rb_raise(rb_eArgError,"invalid field number %d", j);
            }
            return PQgetisnull(result, i, j) ? Qtrue : Qfalse;
    }