@@ -114,7 +114,11 @@ static void deparseExpr(Expr *expr, deparse_expr_cxt *context);
114
114
static void deparseVar (Var * node , deparse_expr_cxt * context );
115
115
static void deparseConst (Const * node , deparse_expr_cxt * context , int showtype );
116
116
static void deparseParam (Param * node , deparse_expr_cxt * context );
117
+ #if PG_VERSION_NUM >=120000
117
118
static void deparseSubscriptingRef (SubscriptingRef * node , deparse_expr_cxt * context );
119
+ #else
120
+ static void deparseArrayRef (ArrayRef * node , deparse_expr_cxt * context );
121
+ #endif
118
122
static void deparseFuncExpr (FuncExpr * node , deparse_expr_cxt * context );
119
123
static void deparseOpExpr (OpExpr * node , deparse_expr_cxt * context );
120
124
static void deparseOperatorName (StringInfo buf , Form_pg_operator opform );
@@ -246,10 +250,15 @@ foreign_expr_walker(Node *node,
246
250
case T_Const :
247
251
case T_Param :
248
252
break ;
253
+ #if PG_VERSION_NUM >=120000
249
254
case T_SubscriptingRef :
250
255
{
251
256
SubscriptingRef * ar = (SubscriptingRef * ) node ;
252
-
257
+ #else
258
+ case T_ArrayRef :
259
+ {
260
+ ArrayRef * ar = (ArrayRef * ) node ;
261
+ #endif
253
262
/* Assignment should not be in restrictions. */
254
263
if (ar -> refassgnexpr != NULL )
255
264
return false;
@@ -1490,8 +1499,13 @@ deparseExpr(Expr *node, deparse_expr_cxt *context)
1490
1499
case T_Param :
1491
1500
deparseParam ((Param * ) node , context );
1492
1501
break ;
1502
+ #if PG_VERSION_NUM >=120000
1493
1503
case T_SubscriptingRef :
1494
1504
deparseSubscriptingRef ((SubscriptingRef * ) node , context );
1505
+ #else
1506
+ case T_ArrayRef :
1507
+ deparseArrayRef ((ArrayRef * ) node , context );
1508
+ #endif
1495
1509
break ;
1496
1510
case T_FuncExpr :
1497
1511
deparseFuncExpr ((FuncExpr * ) node , context );
@@ -1724,8 +1738,13 @@ deparseParam(Param *node, deparse_expr_cxt *context)
1724
1738
/*
1725
1739
* Deparse an array subscript expression.
1726
1740
*/
1741
+ #if PG_VERSION_NUM >=120000
1727
1742
static void
1728
1743
deparseSubscriptingRef (SubscriptingRef * node , deparse_expr_cxt * context )
1744
+ #else
1745
+ static void
1746
+ deparseArrayRef (ArrayRef * node , deparse_expr_cxt * context )
1747
+ #endif
1729
1748
{
1730
1749
StringInfo buf = context -> buf ;
1731
1750
ListCell * lowlist_item ;
0 commit comments