fmod (PGresult)

    /*
     * call-seq:
     *    res.fmod( column_number )
     *
     * Returns the type modifier associated with column _column_number_.
     *
     * Raises ArgumentError if _column_number_ is out of range.
     */
    static VALUE
    pgresult_fmod(VALUE self, VALUE column_number)
    {
            PGresult *result = get_pgresult(self);
            int fnumber = NUM2INT(column_number);
            int modifier;
            if (fnumber >= PQnfields(result)) {
                    rb_raise(rb_eArgError, "Column number is out of range: %d",
                            fnumber);
            }
            if((modifier = PQfmod(result,fnumber)) == -1)
                    rb_raise(rb_eArgError,
                            "No modifier information available for column: %d",
                            fnumber);
            return INT2NUM(modifier);
    }