PostGIS 3.7.0dev-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 2411 of file gserialized_estimate.c.

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

Referenced by gserialized_estimated_extent().

Here is the caller graph for this function: