/*
* call-seq:
* res.ftable( column_number ) -> Fixnum
*
* Returns the Oid of the table from which the column _column_number_
* was fetched.
*
* Raises ArgumentError if _column_number_ is out of range or if
* the Oid is undefined for that column.
*/
static VALUE
pgresult_ftable(VALUE self, VALUE column_number)
{
Oid n = PQftable(get_pgresult(self), NUM2INT(column_number));
if (n == InvalidOid) {
rb_raise(rb_eArgError,"Oid is undefined for column: %d",
NUM2INT(column_number));
}
return INT2FIX(n);
}