PostGIS 3.6.2dev-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 2205 of file gserialized_estimate.c.

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

Referenced by table_get_spatial_index().

Here is the caller graph for this function: