PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ index_get_keytype()

static int index_get_keytype ( Oid  index_oid,
int16  index_attnum 
)
static

Definition at line 2359 of file gserialized_estimate.c.

2360 {
2361  Oid atttypid = InvalidOid;
2362  Form_pg_attribute att_form;
2363 
2364  /* Get the key type for the index key? */
2365  HeapTuple att_tuple = SearchSysCache2(ATTNUM,
2366  ObjectIdGetDatum(index_oid),
2367  Int16GetDatum(index_attnum));
2368 
2369  if (!HeapTupleIsValid(att_tuple))
2370  elog(ERROR, "cache lookup failed for index %u attribute %d", index_oid, index_attnum);
2371 
2372  att_form = (Form_pg_attribute) GETSTRUCT(att_tuple);
2373  atttypid = att_form->atttypid;
2374  ReleaseSysCache(att_tuple);
2375  return atttypid;
2376 }

Referenced by table_get_spatial_index().

Here is the caller graph for this function: