1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-19 15:49:24 +03:00

Add hooks for session start and session end

These hooks can be used in loadable modules. A simple test module is
included.

Discussion:  https://postgr.es/m/20170720204733.40f2b7eb.nagata@sraoss.co.jp

Fabrízio de Royes Mello  and Yugo Nagata
Reviewed by Michael Paquier and Aleksandr Parfenov
This commit is contained in:
Andrew Dunstan
2017-11-15 10:16:34 -05:00
parent ebc189e122
commit cd8ce3a22c
13 changed files with 233 additions and 0 deletions

View File

@@ -35,6 +35,13 @@ extern PGDLLIMPORT const char *debug_query_string;
extern int max_stack_depth;
extern int PostAuthDelay;
/* Hook for plugins to get control at start and end of session */
typedef void (*session_start_hook_type) (void);
typedef void (*session_end_hook_type) (void);
extern PGDLLIMPORT session_start_hook_type session_start_hook;
extern PGDLLIMPORT session_end_hook_type session_end_hook;
/* GUC-configurable parameters */
typedef enum