Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit728775d

Browse files
committed
Now that I look at it, int_array_enum() didn't work either.
1 parent368964e commit728775d

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+
MemoryContextoldcontext;
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)

[8]ページ先頭

©2009-2025 Movatter.jp