* func_parallel * Given procedure id, return the function's proparallel flag. */
| 2428 | * Given procedure id, return the function's proparallel flag. |
| 2429 | */ |
| 2430 | char |
| 2431 | func_parallel(Oid funcid) |
| 2432 | { |
| 2433 | HeapTuple tp; |
| 2434 | char result; |
| 2435 | |
| 2436 | tp = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcid)); |
| 2437 | if (!HeapTupleIsValid(tp)) |
| 2438 | elog(ERROR, "cache lookup failed for function %u", funcid); |
| 2439 | |
| 2440 | result = ((Form_pg_proc) GETSTRUCT(tp))->proparallel; |
| 2441 | ReleaseSysCache(tp); |
| 2442 | return result; |
| 2443 | } |
| 2444 | |
| 2445 | /* |
| 2446 | * get_func_prokind |
no test coverage detected