2571 HeapTuple att_tuple;
2572 Form_pg_attribute att;
2574 if (!attnum || !atttypid)
2575 elog(ERROR,
"%s got null input parameters", __func__);
2578 att_tuple = SearchSysCache2(ATTNAME,
2579 ObjectIdGetDatum(table_oid),
2580 PointerGetDatum(col));
2582 if (!HeapTupleIsValid(att_tuple))
2585 att = (Form_pg_attribute) GETSTRUCT(att_tuple);
2586 *atttypid = att->atttypid;
2587 *attnum = att->attnum;
2588 ReleaseSysCache(att_tuple);