PostgreSQL Source Code: contrib/postgres_fdw/shippable.c File Reference (original) (raw)
Go to the source code of this file.
Functions | |
---|---|
static void | InvalidateShippableCacheCallback (Datum arg, int cacheid, uint32 hashvalue) |
static void | InitializeShippableCache (void) |
static bool | lookup_shippable (Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo) |
bool | is_builtin (Oid objectId) |
bool | is_shippable (Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo) |
◆ InitializeShippableCache()
static void InitializeShippableCache ( void ) | static |
---|
Definition at line 91 of file shippable.c.
92{
94
95
100
101
105}
HTAB * hash_create(const char *tabname, long nelem, const HASHCTL *info, int flags)
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
static HTAB * ShippableCacheHash
static void InvalidateShippableCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
References CacheRegisterSyscacheCallback(), ctl, HASH_BLOBS, hash_create(), HASH_ELEM, InvalidateShippableCacheCallback(), and ShippableCacheHash.
Referenced by is_shippable().
◆ InvalidateShippableCacheCallback()
static void InvalidateShippableCacheCallback ( Datum arg, int cacheid, uint32 hashvalue ) | static |
---|
Definition at line 65 of file shippable.c.
66{
69
70
71
72
73
74
75
78 {
80 &entry->key,
82 NULL) == NULL)
83 elog(ERROR, "hash table corrupted");
84 }
85}
void * hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr)
void * hash_seq_search(HASH_SEQ_STATUS *status)
void hash_seq_init(HASH_SEQ_STATUS *status, HTAB *hashp)
References elog, ERROR, HASH_REMOVE, hash_search(), hash_seq_init(), hash_seq_search(), ShippableCacheEntry::key, and ShippableCacheHash.
Referenced by InitializeShippableCache().
◆ is_builtin()
bool is_builtin | ( | Oid | objectId | ) |
---|
◆ is_shippable()
Definition at line 162 of file shippable.c.
163{
166
167
169 return true;
170
171
173 return false;
174
175
178
179
180 key.objid = objectId;
181 key.classid = classId;
183
184
187
188 if (!entry)
189 {
190
191 bool shippable = lookup_shippable(objectId, classId, fpinfo);
192
193
194
195
196
197
200
202 }
203
205}
static bool lookup_shippable(Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo)
bool is_builtin(Oid objectId)
static void InitializeShippableCache(void)
List * shippable_extensions
References HASH_ENTER, HASH_FIND, hash_search(), InitializeShippableCache(), is_builtin(), sort-test::key, lookup_shippable(), NIL, PgFdwRelationInfo::server, ForeignServer::serverid, ShippableCacheEntry::shippable, PgFdwRelationInfo::shippable_extensions, and ShippableCacheHash.
Referenced by add_foreign_ordered_paths(), foreign_expr_walker(), get_useful_pathkeys_for_relation(), and is_foreign_pathkey().
◆ lookup_shippable()
◆ ShippableCacheHash
HTAB* ShippableCacheHash = NULL | static |
---|