Skip to content

Commit 728775d

Browse files
committed
Now that I look at it, int_array_enum() didn't work either.
1 parent 368964e commit 728775d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/intagg/int_aggregate.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ int_enum(PG_FUNCTION_ARGS)
201201
if (!fcinfo->context)
202202
{
203203
/* Allocate a working context */
204+
MemoryContext oldcontext;
205+
206+
oldcontext = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt);
207+
204208
pc = (CTX *) palloc(sizeof(CTX));
205209

206210
/* Don't copy attribute if you don't need to */
@@ -218,6 +222,7 @@ int_enum(PG_FUNCTION_ARGS)
218222
}
219223
pc->num = 0;
220224
fcinfo->context = (Node *) pc;
225+
MemoryContextSwitchTo(oldcontext);
221226
}
222227
else /* use an existing one */
223228
pc = (CTX *) fcinfo->context;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy