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
| Position | Hook | Description | 
|---|---|---|
| analyze.h | post_parse_analyze_hook | Hook for plugins to get control at end of parse analysis | 
| lt_post_parse_analyze_stmt_hook | Hook for plugins to get control at end of stmt parse analysis. | |
| planner.h | planner_hook | Hook for plugins to get control in planner() | 
| create_upper_paths_hook | Hook for plugins to get control when grouping_planner() plans upper rels | |
| pre_create_ordinary_grouping_paths_hook | Hook for plugins to get control before create_ordinary_grouping_paths. | |
| lt_distribute_qual_to_rels_hook | Hook for plugins to get control of distribute qual to rels. | |
| paths.h | set_rel_pathlist_hook | Hook for plugins to get control in set_rel_pathlist() | 
| set_join_pathlist_hook | Hook for plugins to get control in add_paths_to_joinrel() | |
| join_search_hook | Hook for plugins to replace standard_join_search() | |
| pushdown_quals_to_subquery_hook | Hook for plugins to decide whether to pushdown quals to subquery. | |
| planmain.h | support_semijoin_to_inner_join_hook | Hook for plugins to get control of converting semijoin to inner join. | 
| lt_order_qual_clauses_hook | Hook for plugins to get control of order qual clauses. | |
| Executor.h | ExecutorStart_hook | Hook for plugins to get control in ExecutorStart() | 
| ExecutorRun_hook | Hook for plugins to get control in ExecutorRun() | |
| ExecutorFinish_hook | Hook for plugins to get control in ExecutorFinish() | |
| ExecutorEnd_hook | Hook for plugins to get control in ExecutorEnd() | |
| ExecutorCheckPerms_hook | Hook for plugins to get control in ExecCheckRTPerms() | |
| Utility.h | ProcessUtility_hook | Hook for plugins to get control in ProcessUtility() | 
| plancat.h | get_relation_info_hook | Hook for plugins to get control in get_relation_info() | 
| auth.h | ClientAuthentication_hook | Hook for plugins to get control in ClientAuthentication() | 
| explain.h | ExplainOneQuery_hook | Hook for plugins to get control in ExplainOneQuery() | 
| explain_get_index_name_hook | Hook for plugins to get control in explain_get_index_name() | |
| user.h | check_password_hook | Hook to check passwords in CreateRole() and AlterRole() | 
| elog.h | emit_log_hook | Hook for intercepting messages before they are sent to the server log | 
| fmgr.h | needs_fmgr_hook | Hooks for function calls | 
| fmgr_hook | Hooks for function calls | |
| lsyscache.h | get_attavgwidth_hook | Hook for plugins to get control in get_attavgwidth() | 
| selfuncs.h | get_relation_stats_hook | Hooks for plugins to get control when we ask for stats | 
| get_index_stats_hook | Hooks for plugins to get control when we ask for stats | |
| objectaccess.h | object_access_hook | Plugin provides a hook function matching this signature | 
| libpq-be.h | openssl_tls_init_hook | init hook for SSL, the default sets the password callback if appropriate | 
| rowsecurity.h | row_security_policy_hook_permissive | hooks 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.h | shmem_startup_hook | hooks to allow extensions to set up their shmem allocations. | 
| prep.h | lt_judge_can_pull_up_hook | Hook for plugins to decide is or not to pull up sub query. | 
| lt_judge_sublink_can_pull_up_hook | Hook for plugins to decide is or not to pull up sublink. |