/*
 * call-seq:
 *    res.ftablecol( column_number ) -> Fixnum
 *
 * Returns the column number (within its table) of the table from 
 * which the column _column_number_ is made up.
 *
 * Raises ArgumentError if _column_number_ is out of range or if
 * the column number from its table is undefined for that column.
 */
static VALUE
pgresult_ftablecol(VALUE self, VALUE column_number)
{
        int n = PQftablecol(get_pgresult(self), NUM2INT(column_number));
        if (n == 0) {
                rb_raise(rb_eArgError,
                        "Column number from table is undefined for column: %d", 
                        NUM2INT(column_number));
        }
        return INT2FIX(n);
}