PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/reloptions.h"
#include "utils/attoptcache.h"
#include "utils/catcache.h"
#include "utils/hsearch.h"
#include "utils/inval.h"
#include "utils/syscache.h"
#include "varatt.h"
Go to the source code of this file.
Data Structures | |
struct | AttoptCacheKey |
struct | AttoptCacheEntry |
Functions | |
static void | InvalidateAttoptCacheCallback (Datum arg, int cacheid, uint32 hashvalue) |
static uint32 | relatt_cache_syshash (const void *key, Size keysize) |
static void | InitializeAttoptCache (void) |
AttributeOpts * | get_attribute_options (Oid attrelid, int attnum) |
Variables | |
static HTAB * | AttoptCacheHash = NULL |
AttributeOpts* get_attribute_options | ( | Oid | attrelid, |
int | attnum | ||
) |
Definition at line 131 of file attoptcache.c.
References attnum, AttoptCacheHash, attribute_reloptions(), CacheMemoryContext, HASH_ENTER, HASH_FIND, hash_search(), HeapTupleIsValid, InitializeAttoptCache(), Int16GetDatum(), sort-test::key, MemoryContextAlloc(), ObjectIdGetDatum(), AttoptCacheEntry::opts, opts, palloc(), ReleaseSysCache(), SearchSysCache2(), SysCacheGetAttr(), and VARSIZE.
Referenced by compute_expr_stats(), and do_analyze_rel().
|
static |
Definition at line 97 of file attoptcache.c.
References AttoptCacheHash, CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), ctl, hash_create(), HASH_ELEM, HASH_FUNCTION, InvalidateAttoptCacheCallback(), and relatt_cache_syshash().
Referenced by get_attribute_options().
Definition at line 53 of file attoptcache.c.
References AttoptCacheHash, elog, ERROR, HASH_REMOVE, hash_search(), hash_seq_init(), hash_seq_init_with_hash_value(), hash_seq_search(), AttoptCacheEntry::key, AttoptCacheEntry::opts, and pfree().
Referenced by InitializeAttoptCache().
Definition at line 84 of file attoptcache.c.
References Assert, AttoptCacheKey::attnum, AttoptCacheKey::attrelid, GetSysCacheHashValue2, and sort-test::key.
Referenced by InitializeAttoptCache().
|
static |
Definition at line 29 of file attoptcache.c.
Referenced by get_attribute_options(), InitializeAttoptCache(), and InvalidateAttoptCacheCallback().