* func_exec_location * Given procedure id, return the function's proexeclocation field */
| 2510 | * Given procedure id, return the function's proexeclocation field |
| 2511 | */ |
| 2512 | char |
| 2513 | func_exec_location(Oid funcid) |
| 2514 | { |
| 2515 | HeapTuple tp; |
| 2516 | char result; |
| 2517 | bool isnull; |
| 2518 | |
| 2519 | tp = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcid)); |
| 2520 | if (!HeapTupleIsValid(tp)) |
| 2521 | elog(ERROR, "cache lookup failed for function %u", funcid); |
| 2522 | |
| 2523 | result = DatumGetChar( |
| 2524 | SysCacheGetAttr(PROCOID, tp, Anum_pg_proc_proexeclocation, &isnull)); |
| 2525 | ReleaseSysCache(tp); |
| 2526 | |
| 2527 | Assert(!isnull); |
| 2528 | return result; |
| 2529 | } |
| 2530 | |
| 2531 | /* ---------- RELATION CACHE ---------- */ |
| 2532 |
no test coverage detected