Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4c3d05d

Browse files
committed
Remove dead code.
These memory context switches are useless in the wake of commit 1cff1b9. Noted by Jesper Pedersen. Discussion: https://postgr.es/m/[email protected]
1 parent c6bce6e commit 4c3d05d

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/backend/commands/async.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -693,15 +693,8 @@ pg_listening_channels(PG_FUNCTION_ARGS)
693693
/* stuff done only on the first call of the function */
694694
if (SRF_IS_FIRSTCALL())
695695
{
696-
MemoryContext oldcontext;
697-
698696
/* create a function context for cross-call persistence */
699697
funcctx = SRF_FIRSTCALL_INIT();
700-
701-
/* switch to memory context appropriate for multiple function calls */
702-
oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
703-
704-
MemoryContextSwitchTo(oldcontext);
705698
}
706699

707700
/* stuff done on every call of the function */

0 commit comments

Comments
 (0)