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 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 104 of file attoptcache.c.
References attnum, 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 78 of file attoptcache.c.
References ATTNUM, AttoptCacheHash, CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), HASHCTL::entrysize, HASH_BLOBS, hash_create(), HASH_ELEM, InvalidateAttoptCacheCallback(), and HASHCTL::keysize.
Referenced by get_attribute_options().
Definition at line 55 of file attoptcache.c.
References AttoptCacheHash, elog(), ERROR, HASH_REMOVE, hash_search(), hash_seq_init(), hash_seq_search(), AttoptCacheEntry::key, AttoptCacheEntry::opts, and pfree().
Referenced by InitializeAttoptCache().
|
static |
Definition at line 29 of file attoptcache.c.
Referenced by get_attribute_options(), InitializeAttoptCache(), and InvalidateAttoptCacheCallback().