We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 379591f commit 851ff93Copy full SHA for 851ff93
src/backend/utils/adt/arrayfuncs.c
@@ -3992,13 +3992,14 @@ hash_array(PG_FUNCTION_ARGS)
3992
MemoryContext oldcontext;
3993
TypeCacheEntry *record_typentry;
3994
3995
- oldcontext = MemoryContextSwitchTo(CacheMemoryContext);
+ oldcontext = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt);
3996
3997
/*
3998
* Make fake type cache entry structure. Note that we can't just
3999
* modify typentry, since that points directly into the type cache.
4000
*/
4001
- record_typentry = palloc(sizeof(*record_typentry));
+ record_typentry = palloc0(sizeof(*record_typentry));
4002
+ record_typentry->type_id = element_type;
4003
4004
/* fill in what we need below */
4005
record_typentry->typlen = typentry->typlen;
0 commit comments