* InitializeAttoptCache * Initialize the attribute options cache. */
| 74 | * Initialize the attribute options cache. |
| 75 | */ |
| 76 | static void |
| 77 | InitializeAttoptCache(void) |
| 78 | { |
| 79 | HASHCTL ctl; |
| 80 | |
| 81 | /* Initialize the hash table. */ |
| 82 | ctl.keysize = sizeof(AttoptCacheKey); |
| 83 | ctl.entrysize = sizeof(AttoptCacheEntry); |
| 84 | AttoptCacheHash = |
| 85 | hash_create("Attopt cache", 256, &ctl, |
| 86 | HASH_ELEM | HASH_BLOBS); |
| 87 | |
| 88 | /* Make sure we've initialized CacheMemoryContext. */ |
| 89 | if (!CacheMemoryContext) |
| 90 | CreateCacheMemoryContext(); |
| 91 | |
| 92 | /* Watch for invalidation events. */ |
| 93 | CacheRegisterSyscacheCallback(ATTNUM, |
| 94 | InvalidateAttoptCacheCallback, |
| 95 | (Datum) 0); |
| 96 | } |
| 97 | |
| 98 | /* |
| 99 | * get_attribute_options |
no test coverage detected