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

Commit 02010f9

Browse files
antamelkovdb75
authored andcommitted
PGPRO-6148, PGPRO-7080: Use common macro for all PG versions instead of add_vars_to_targetlist() function.
Reason: b3ff6c74
1 parent 0b54f70 commit 02010f9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

‎src/compat/rowmarks_fix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ append_tle_for_rowmark(PlannerInfo *root, PlanRowMark *rc)
4747

4848
root->processed_tlist = lappend(root->processed_tlist, tle);
4949

50-
add_vars_to_targetlist(root, list_make1(var), bms_make_singleton(0), true);
50+
add_vars_to_targetlist_compat(root, list_make1(var), bms_make_singleton(0));
5151
}
5252

5353

‎src/include/compat/rowmarks_fix.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,17 @@ void append_tle_for_rowmark(PlannerInfo *root, PlanRowMark *rc);
4545

4646
#endif
4747

48+
/*
49+
* add_vars_to_targetlist()
50+
* In >=16 last argument was removed (b3ff6c742f6c)
51+
*/
52+
#if PG_VERSION_NUM >= 160000
53+
#define add_vars_to_targetlist_compat(root, vars, where_needed) \
54+
add_vars_to_targetlist((root), (vars), (where_needed));
55+
#else
56+
#define add_vars_to_targetlist_compat(root, vars, where_needed) \
57+
add_vars_to_targetlist((root), (vars), (where_needed), true);
58+
#endif
59+
4860

4961
#endif /* ROWMARKS_FIX_H */

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /