Merge pull request #100 from darkfronza/PG-204_save_previous_emit_log_hook

PG-204: Fix save previous emit_log_hook.
pull/101/head
Ibrar Ahmed 2021-09-01 23:43:36 +05:00 committed by GitHub
commit e541633670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -293,6 +293,7 @@ _PG_init(void)
planner_hook_next = planner_hook;
planner_hook = HOOK(pgss_planner_hook);
#endif
prev_emit_log_hook = emit_log_hook;
emit_log_hook = HOOK(pgsm_emit_log_hook);
prev_ExecutorCheckPerms_hook = ExecutorCheckPerms_hook;
ExecutorCheckPerms_hook = HOOK(pgss_ExecutorCheckPerms);
@ -317,6 +318,7 @@ _PG_fini(void)
ExecutorFinish_hook = prev_ExecutorFinish;
ExecutorEnd_hook = prev_ExecutorEnd;
ProcessUtility_hook = prev_ProcessUtility;
emit_log_hook = prev_emit_log_hook;
free(nested_queryids);
regfree(&preg_query_comments);