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

Commitcbbf906

Browse files
committed
Fix func signature change in minor pgpro releases, arrgh.
1 parent7258169 commitcbbf906

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed

‎src/include/compat/pg_compat.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,19 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
992992
AddRelationNewConstraints((rel), (newColDefaults), (newConstrains), (allow_merge), (is_local), (is_internal))
993993
#endif
994994

995-
995+
/*
996+
* [PGPRO-3725] Since 11.7 and 12.1 in pgpro standard and ee PGPRO-2843
997+
* appeared, changing the signature, wow. It is not present in pgpro 1c
998+
* though; PG_VERSION_STR is defined in std and ee but not in 1c, so it is
999+
* hackishly used for distinguishing them.
1000+
*/
1001+
#if defined(PGPRO_VERSION_STR)&& (PG_VERSION_NUM >=110006)
1002+
#defineexpression_tree_mutator_compat(node,mutator,context) \
1003+
expression_tree_mutator((node), (mutator), (context), 0)
1004+
#else
1005+
#defineexpression_tree_mutator_compat(node,mutator,context) \
1006+
expression_tree_mutator((node), (mutator), (context))
1007+
#endif
9961008

9971009
/*
9981010
* -------------

‎src/nodes_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ canonicalize_custom_exprs_mutator(Node *node, void *cxt)
373373
return (Node*)var;
374374
}
375375

376-
returnexpression_tree_mutator(node,canonicalize_custom_exprs_mutator,NULL);
376+
returnexpression_tree_mutator_compat(node,canonicalize_custom_exprs_mutator,NULL);
377377
}
378378

379379
staticList*

‎src/partition_filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ fix_returning_list_mutator(Node *node, void *state)
11641164
return (Node*)var;
11651165
}
11661166

1167-
returnexpression_tree_mutator(node,fix_returning_list_mutator,state);
1167+
returnexpression_tree_mutator_compat(node,fix_returning_list_mutator,state);
11681168
}
11691169

11701170

‎src/planner_tree_modification.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -709,15 +709,15 @@ adjust_appendrel_varnos(Node *node, adjust_appendrel_varnos_cxt *context)
709709
SubLink*sl= (SubLink*)node;
710710

711711
/* Examine its expression */
712-
sl->testexpr=expression_tree_mutator(sl->testexpr,
713-
adjust_appendrel_varnos,
714-
context);
712+
sl->testexpr=expression_tree_mutator_compat(sl->testexpr,
713+
adjust_appendrel_varnos,
714+
context);
715715
return (Node*)sl;
716716
}
717717

718-
returnexpression_tree_mutator(node,
719-
adjust_appendrel_varnos,
720-
context);
718+
returnexpression_tree_mutator_compat(node,
719+
adjust_appendrel_varnos,
720+
context);
721721
}
722722

723723

@@ -1063,8 +1063,8 @@ eval_extern_params_mutator(Node *node, ParamListInfo params)
10631063
}
10641064
}
10651065

1066-
returnexpression_tree_mutator(node,eval_extern_params_mutator,
1067-
(void*)params);
1066+
returnexpression_tree_mutator_compat(node,eval_extern_params_mutator,
1067+
(void*)params);
10681068
}
10691069

10701070
/* Check whether Var translation list is trivial (no shuffle) */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp