* Decide whether a cached PLyProcedure struct is still valid */
| 414 | * Decide whether a cached PLyProcedure struct is still valid |
| 415 | */ |
| 416 | static bool |
| 417 | PLy_procedure_valid(PLyProcedure *proc, HeapTuple procTup) |
| 418 | { |
| 419 | if (proc == NULL) |
| 420 | return false; |
| 421 | |
| 422 | /* If the pg_proc tuple has changed, it's not valid */ |
| 423 | if (!(proc->fn_xmin == HeapTupleHeaderGetRawXmin(procTup->t_data) && |
| 424 | ItemPointerEquals(&proc->fn_tid, &procTup->t_self))) |
| 425 | return false; |
| 426 | |
| 427 | return true; |
| 428 | } |
| 429 | |
| 430 | static char * |
| 431 | PLy_procedure_munge_source(const char *name, const char *src) |
no test coverage detected