* GetCatCacheHashValue * * Compute the hash value for a given set of search keys. * * The reason for exposing this as part of the API is that the hash value is * exposed in cache invalidation operations, so there are places outside the * catcache code that need to be able to compute the hash values. */
| 1536 | * catcache code that need to be able to compute the hash values. |
| 1537 | */ |
| 1538 | uint32 |
| 1539 | GetCatCacheHashValue(CatCache *cache, |
| 1540 | Datum v1, |
| 1541 | Datum v2, |
| 1542 | Datum v3, |
| 1543 | Datum v4) |
| 1544 | { |
| 1545 | /* |
| 1546 | * one-time startup overhead for each cache |
| 1547 | */ |
| 1548 | if (cache->cc_tupdesc == NULL) |
| 1549 | CatalogCacheInitializeCache(cache); |
| 1550 | |
| 1551 | /* |
| 1552 | * calculate the hash value |
| 1553 | */ |
| 1554 | return CatalogCacheComputeHashValue(cache, cache->cc_nkeys, v1, v2, v3, v4); |
| 1555 | } |
| 1556 | |
| 1557 | |
| 1558 | /* |
no test coverage detected