PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ get_attnum_attypid()

static bool get_attnum_attypid ( Oid  table_oid,
const char *  col,
int16 *  attnum,
Oid *  atttypid 
)
static

Definition at line 2569 of file gserialized_estimate.c.

2570 {
2571  HeapTuple att_tuple;
2572  Form_pg_attribute att;
2573 
2574  if (!attnum || !atttypid)
2575  elog(ERROR, "%s got null input parameters", __func__);
2576 
2577  /* Is the index on the column name we are looking for? */
2578  att_tuple = SearchSysCache2(ATTNAME,
2579  ObjectIdGetDatum(table_oid),
2580  PointerGetDatum(col));
2581 
2582  if (!HeapTupleIsValid(att_tuple))
2583  return false;
2584 
2585  att = (Form_pg_attribute) GETSTRUCT(att_tuple);
2586  *atttypid = att->atttypid;
2587  *attnum = att->attnum;
2588  ReleaseSysCache(att_tuple);
2589  return true;
2590 }

Referenced by gserialized_estimated_extent().

Here is the caller graph for this function: