Appendix N. Hooks List For Extension

There are many hooks that can be used by extension to extend internal functionality. Hooks can modify behavior at different places, including when running SQL statements.

A list of available hooks is listed below

Table N.1. Hooks list

PositionHookDescription
analyze.hpost_parse_analyze_hookHook for plugins to get control at end of parse analysis
lt_post_parse_analyze_stmt_hookHook for plugins to get control at end of stmt parse analysis.
planner.hplanner_hookHook for plugins to get control in planner()
create_upper_paths_hookHook for plugins to get control when grouping_planner() plans upper rels
pre_create_ordinary_grouping_paths_hookHook for plugins to get control before create_ordinary_grouping_paths.
lt_distribute_qual_to_rels_hookHook for plugins to get control of distribute qual to rels.
paths.hset_rel_pathlist_hookHook for plugins to get control in set_rel_pathlist()
set_join_pathlist_hookHook for plugins to get control in add_paths_to_joinrel()
join_search_hookHook for plugins to replace standard_join_search()
pushdown_quals_to_subquery_hookHook for plugins to decide whether to pushdown quals to subquery.
planmain.hsupport_semijoin_to_inner_join_hookHook for plugins to get control of converting semijoin to inner join.
lt_order_qual_clauses_hookHook for plugins to get control of order qual clauses.
Executor.hExecutorStart_hookHook for plugins to get control in ExecutorStart()
ExecutorRun_hookHook for plugins to get control in ExecutorRun()
ExecutorFinish_hookHook for plugins to get control in ExecutorFinish()
ExecutorEnd_hookHook for plugins to get control in ExecutorEnd()
ExecutorCheckPerms_hookHook for plugins to get control in ExecCheckRTPerms()
Utility.hProcessUtility_hookHook for plugins to get control in ProcessUtility()
plancat.hget_relation_info_hookHook for plugins to get control in get_relation_info()
auth.hClientAuthentication_hookHook for plugins to get control in ClientAuthentication()
explain.hExplainOneQuery_hookHook for plugins to get control in ExplainOneQuery()
explain_get_index_name_hookHook for plugins to get control in explain_get_index_name()
user.hcheck_password_hookHook to check passwords in CreateRole() and AlterRole()
elog.hemit_log_hookHook for intercepting messages before they are sent to the server log
fmgr.hneeds_fmgr_hookHooks for function calls
fmgr_hookHooks for function calls
lsyscache.hget_attavgwidth_hookHook for plugins to get control in get_attavgwidth()
selfuncs.hget_relation_stats_hookHooks for plugins to get control when we ask for stats
get_index_stats_hookHooks for plugins to get control when we ask for stats
objectaccess.hobject_access_hookPlugin provides a hook function matching this signature
libpq-be.hopenssl_tls_init_hookinit hook for SSL, the default sets the password callback if appropriate
rowsecurity.hrow_security_policy_hook_permissivehooks to allow extensions to add their own security policies, it is used to add policies which are combined with the other permissive policies, using OR.
ipc.hshmem_startup_hookhooks to allow extensions to set up their shmem allocations.
prep.hlt_judge_can_pull_up_hookHook for plugins to decide is or not to pull up sub query.
lt_judge_sublink_can_pull_up_hookHook for plugins to decide is or not to pull up sublink.

English|中文