Skip to content

Commit 64a4a2b

Browse files
authored
Merge pull request #254 from postgrespro/PGPRO-7080
PGPRO-6148, PGPRO-7080: Use common macro for all PG versions instead of add_vars_to_targetlist() function
2 parents 0b54f70 + 02010f9 commit 64a4a2b

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy