Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6ca926c

Browse files
committed
add pathman_ prefix to common hooks
1 parent370f41f commit6ca926c

File tree

3 files changed

+40
-40
lines changed

3 files changed

+40
-40
lines changed

‎src/hooks.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ allow_star_schema_join(PlannerInfo *root,
6262
}
6363

6464

65-
set_join_pathlist_hook_typeset_join_pathlist_next=NULL;
66-
set_rel_pathlist_hook_typeset_rel_pathlist_hook_next=NULL;
67-
planner_hook_typeplanner_hook_next=NULL;
68-
post_parse_analyze_hook_typepost_parse_analyze_hook_next=NULL;
69-
shmem_startup_hook_typeshmem_startup_hook_next=NULL;
70-
ProcessUtility_hook_typeprocess_utility_hook_next=NULL;
65+
set_join_pathlist_hook_typepathman_set_join_pathlist_next=NULL;
66+
set_rel_pathlist_hook_typepathman_set_rel_pathlist_hook_next=NULL;
67+
planner_hook_typepathman_planner_hook_next=NULL;
68+
post_parse_analyze_hook_typepathman_post_parse_analyze_hook_next=NULL;
69+
shmem_startup_hook_typepathman_shmem_startup_hook_next=NULL;
70+
ProcessUtility_hook_typepathman_process_utility_hook_next=NULL;
7171

7272

7373
/* Take care of joins */
@@ -91,9 +91,9 @@ pathman_join_pathlist_hook(PlannerInfo *root,
9191
ListCell*lc;
9292

9393
/* Call hooks set by other extensions */
94-
if (set_join_pathlist_next)
95-
set_join_pathlist_next(root,joinrel,outerrel,
96-
innerrel,jointype,extra);
94+
if (pathman_set_join_pathlist_next)
95+
pathman_set_join_pathlist_next(root,joinrel,outerrel,
96+
innerrel,jointype,extra);
9797

9898
/* Check that both pg_pathman & RuntimeAppend nodes are enabled */
9999
if (!IsPathmanReady()|| !pg_pathman_enable_runtimeappend)
@@ -312,8 +312,8 @@ pathman_rel_pathlist_hook(PlannerInfo *root,
312312
intirange_len;
313313

314314
/* Invoke original hook if needed */
315-
if (set_rel_pathlist_hook_next!=NULL)
316-
set_rel_pathlist_hook_next(root,rel,rti,rte);
315+
if (pathman_set_rel_pathlist_hook_next)
316+
pathman_set_rel_pathlist_hook_next(root,rel,rti,rte);
317317

318318
/* Make sure that pg_pathman is ready */
319319
if (!IsPathmanReady())
@@ -631,8 +631,8 @@ pathman_planner_hook(Query *parse, int cursorOptions, ParamListInfo boundParams)
631631
}
632632

633633
/* Invoke original hook if needed */
634-
if (planner_hook_next)
635-
result=planner_hook_next(parse,cursorOptions,boundParams);
634+
if (pathman_planner_hook_next)
635+
result=pathman_planner_hook_next(parse,cursorOptions,boundParams);
636636
else
637637
result=standard_planner(parse,cursorOptions,boundParams);
638638

@@ -671,11 +671,11 @@ pathman_planner_hook(Query *parse, int cursorOptions, ParamListInfo boundParams)
671671
* any statement, including utility commands
672672
*/
673673
void
674-
pathman_post_parse_analysis_hook(ParseState*pstate,Query*query)
674+
pathman_post_parse_analyze_hook(ParseState*pstate,Query*query)
675675
{
676676
/* Invoke original hook if needed */
677-
if (post_parse_analyze_hook_next)
678-
post_parse_analyze_hook_next(pstate,query);
677+
if (pathman_post_parse_analyze_hook_next)
678+
pathman_post_parse_analyze_hook_next(pstate,query);
679679

680680
/* See cook_partitioning_expression() */
681681
if (!pathman_hooks_enabled)
@@ -735,7 +735,7 @@ pathman_post_parse_analysis_hook(ParseState *pstate, Query *query)
735735
if (IsPathmanReady()&&get_planner_calls_count()>0)
736736
{
737737
/* Check that pg_pathman is the last extension loaded */
738-
if (post_parse_analyze_hook!=pathman_post_parse_analysis_hook)
738+
if (post_parse_analyze_hook!=pathman_post_parse_analyze_hook)
739739
{
740740
Oidsave_userid;
741741
intsave_sec_context;
@@ -786,8 +786,8 @@ void
786786
pathman_shmem_startup_hook(void)
787787
{
788788
/* Invoke original hook if needed */
789-
if (shmem_startup_hook_next!=NULL)
790-
shmem_startup_hook_next();
789+
if (pathman_shmem_startup_hook_next)
790+
pathman_shmem_startup_hook_next();
791791

792792
/* Allocate shared memory objects */
793793
LWLockAcquire(AddinShmemInitLock,LW_EXCLUSIVE);
@@ -942,8 +942,8 @@ pathman_process_utility_hook(Node *first_arg,
942942
}
943943

944944
/* Finally call process_utility_hook_next or standard_ProcessUtility */
945-
call_process_utility_compat((process_utility_hook_next ?
946-
process_utility_hook_next :
945+
call_process_utility_compat((pathman_process_utility_hook_next ?
946+
pathman_process_utility_hook_next :
947947
standard_ProcessUtility),
948948
first_arg,queryString,
949949
context,params,queryEnv,

‎src/include/hooks.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
#include"tcop/utility.h"
2121

2222

23-
externset_join_pathlist_hook_typeset_join_pathlist_next;
24-
externset_rel_pathlist_hook_typeset_rel_pathlist_hook_next;
25-
externplanner_hook_typeplanner_hook_next;
26-
externpost_parse_analyze_hook_typepost_parse_analyze_hook_next;
27-
externshmem_startup_hook_typeshmem_startup_hook_next;
28-
externProcessUtility_hook_typeprocess_utility_hook_next;
23+
externset_join_pathlist_hook_typepathman_set_join_pathlist_next;
24+
externset_rel_pathlist_hook_typepathman_set_rel_pathlist_hook_next;
25+
externplanner_hook_typepathman_planner_hook_next;
26+
externpost_parse_analyze_hook_typepathman_post_parse_analyze_hook_next;
27+
externshmem_startup_hook_typepathman_shmem_startup_hook_next;
28+
externProcessUtility_hook_typepathman_process_utility_hook_next;
2929

3030

3131
voidpathman_join_pathlist_hook(PlannerInfo*root,
@@ -46,7 +46,7 @@ PlannedStmt * pathman_planner_hook(Query *parse,
4646
intcursorOptions,
4747
ParamListInfoboundParams);
4848

49-
voidpathman_post_parse_analysis_hook(ParseState*pstate,
49+
voidpathman_post_parse_analyze_hook(ParseState*pstate,
5050
Query*query);
5151

5252
voidpathman_shmem_startup_hook(void);

‎src/pg_pathman.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,18 @@ _PG_init(void)
299299
restore_pathman_init_state(&temp_init_state);
300300

301301
/* Set basic hooks */
302-
set_rel_pathlist_hook_next=set_rel_pathlist_hook;
303-
set_rel_pathlist_hook=pathman_rel_pathlist_hook;
304-
set_join_pathlist_next=set_join_pathlist_hook;
305-
set_join_pathlist_hook=pathman_join_pathlist_hook;
306-
shmem_startup_hook_next=shmem_startup_hook;
307-
shmem_startup_hook=pathman_shmem_startup_hook;
308-
post_parse_analyze_hook_next=post_parse_analyze_hook;
309-
post_parse_analyze_hook=pathman_post_parse_analysis_hook;
310-
planner_hook_next=planner_hook;
311-
planner_hook=pathman_planner_hook;
312-
process_utility_hook_next=ProcessUtility_hook;
313-
ProcessUtility_hook=pathman_process_utility_hook;
302+
pathman_set_rel_pathlist_hook_next=set_rel_pathlist_hook;
303+
set_rel_pathlist_hook=pathman_rel_pathlist_hook;
304+
pathman_set_join_pathlist_next=set_join_pathlist_hook;
305+
set_join_pathlist_hook=pathman_join_pathlist_hook;
306+
pathman_shmem_startup_hook_next=shmem_startup_hook;
307+
shmem_startup_hook=pathman_shmem_startup_hook;
308+
pathman_post_parse_analyze_hook_next=post_parse_analyze_hook;
309+
post_parse_analyze_hook=pathman_post_parse_analyze_hook;
310+
pathman_planner_hook_next=planner_hook;
311+
planner_hook=pathman_planner_hook;
312+
pathman_process_utility_hook_next=ProcessUtility_hook;
313+
ProcessUtility_hook=pathman_process_utility_hook;
314314

315315
/* Initialize static data for all subsystems */
316316
init_main_pathman_toggles();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp