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

◆ get_attnum_attypid()

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

Definition at line 2415 of file gserialized_estimate.c.

2416{
2417 HeapTuple att_tuple;
2418 Form_pg_attribute att;
2419
2420 if (!attnum || !atttypid)
2421 elog(ERROR, "%s got null input parameters", __func__);
2422
2423 /* Is the index on the column name we are looking for? */
2424 att_tuple = SearchSysCache2(ATTNAME,
2425 ObjectIdGetDatum(table_oid),
2426 PointerGetDatum(col));
2427
2428 if (!HeapTupleIsValid(att_tuple))
2429 return false;
2430
2431 att = (Form_pg_attribute) GETSTRUCT(att_tuple);
2432 *atttypid = att->atttypid;
2433 *attnum = att->attnum;
2434 ReleaseSysCache(att_tuple);
2435 return true;
2436}

Referenced by gserialized_estimated_extent().

Here is the caller graph for this function: