* SearchSysCacheCopy * * A convenience routine that does SearchSysCache and (if successful) * returns a modifiable copy of the syscache entry. The original * syscache entry is released before returning. The caller should * heap_freetuple() the result when done with it. */
| 1415 | * heap_freetuple() the result when done with it. |
| 1416 | */ |
| 1417 | HeapTuple |
| 1418 | SearchSysCacheCopy(int cacheId, |
| 1419 | Datum key1, |
| 1420 | Datum key2, |
| 1421 | Datum key3, |
| 1422 | Datum key4) |
| 1423 | { |
| 1424 | HeapTuple tuple, |
| 1425 | newtuple; |
| 1426 | |
| 1427 | tuple = SearchSysCache(cacheId, key1, key2, key3, key4); |
| 1428 | if (!HeapTupleIsValid(tuple)) |
| 1429 | return tuple; |
| 1430 | newtuple = heap_copytuple(tuple); |
| 1431 | ReleaseSysCache(tuple); |
| 1432 | return newtuple; |
| 1433 | } |
| 1434 | |
| 1435 | /* |
| 1436 | * SearchSysCacheExists |
no test coverage detected