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

Commitcc6b1e8

Browse files
committed
Add compat version of build_simple_rel routine
1 parent981e769 commitcc6b1e8

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

‎src/include/compat/pg_compat.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,19 @@
7575
#endif
7676

7777

78+
/*
79+
* build_simple_rel()
80+
*/
81+
#ifPG_VERSION_NUM >=100000
82+
#definebuild_simple_rel_compat(root,childRTindex,parent_rel) \
83+
build_simple_rel((root), (childRTindex), (parent_rel))
84+
#elifPG_VERSION_NUM >=90500
85+
#definebuild_simple_rel_compat(root,childRTindex,parent_rel) \
86+
build_simple_rel((root), (childRTindex), \
87+
(parent_rel) ? RELOPT_OTHER_MEMBER_REL : RELOPT_BASEREL)
88+
#endif
89+
90+
7891
/*
7992
* Define ALLOCSET_DEFAULT_SIZES for our precious MemoryContexts
8093
*/

‎src/pg_pathman.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,7 @@ append_child_relation(PlannerInfo *root, Relation parent_relation,
338338
root->simple_rte_array[childRTindex]=child_rte;
339339

340340
/* Create RelOptInfo for this child (and make some estimates as well) */
341-
#ifPG_VERSION_NUM >=100000
342-
child_rel=build_simple_rel(root,childRTindex,parent_rel);
343-
#else
344-
child_rel=build_simple_rel(root,childRTindex,RELOPT_OTHER_MEMBER_REL);
345-
#endif
341+
child_rel=build_simple_rel_compat(root,childRTindex,parent_rel);
346342

347343
/* Increase total_table_pages using the 'child_rel' */
348344
root->total_table_pages+= (double)child_rel->pages;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp