PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ index_get_keytype()

static int index_get_keytype ( Oid  index_oid,
int16  index_attnum 
)
static

Definition at line 2201 of file gserialized_estimate.c.

2202{
2203 Oid atttypid = InvalidOid;
2204 Form_pg_attribute att_form;
2205
2206 /* Get the key type for the index key? */
2207 HeapTuple att_tuple = SearchSysCache2(ATTNUM,
2208 ObjectIdGetDatum(index_oid),
2209 Int16GetDatum(index_attnum));
2210
2211 if (!HeapTupleIsValid(att_tuple))
2212 elog(ERROR, "cache lookup failed for index %u attribute %d", index_oid, index_attnum);
2213
2214 att_form = (Form_pg_attribute) GETSTRUCT(att_tuple);
2215 atttypid = att_form->atttypid;
2216 ReleaseSysCache(att_tuple);
2217 return atttypid;
2218}

Referenced by table_get_spatial_index().

Here is the caller graph for this function: