@@ -114,7 +114,11 @@ static void deparseExpr(Expr *expr, deparse_expr_cxt *context);
114114static void deparseVar (Var * node ,deparse_expr_cxt * context );
115115static void deparseConst (Const * node ,deparse_expr_cxt * context ,int showtype );
116116static void deparseParam (Param * node ,deparse_expr_cxt * context );
117+ #if PG_VERSION_NUM >=120000
117118static void deparseSubscriptingRef (SubscriptingRef * node ,deparse_expr_cxt * context );
119+ #else
120+ static void deparseArrayRef (ArrayRef * node ,deparse_expr_cxt * context );
121+ #endif
118122static void deparseFuncExpr (FuncExpr * node ,deparse_expr_cxt * context );
119123static void deparseOpExpr (OpExpr * node ,deparse_expr_cxt * context );
120124static void deparseOperatorName (StringInfo buf ,Form_pg_operator opform );
@@ -246,10 +250,15 @@ foreign_expr_walker(Node *node,
246250case T_Const :
247251case T_Param :
248252break ;
253+ #if PG_VERSION_NUM >=120000
249254case T_SubscriptingRef :
250255{
251256SubscriptingRef * ar = (SubscriptingRef * )node ;
252-
257+ #else
258+ case T_ArrayRef :
259+ {
260+ ArrayRef * ar = (ArrayRef * )node ;
261+ #endif
253262/* Assignment should not be in restrictions. */
254263if (ar -> refassgnexpr != NULL )
255264return false;
@@ -1490,8 +1499,13 @@ deparseExpr(Expr *node, deparse_expr_cxt *context)
14901499case T_Param :
14911500deparseParam ((Param * )node ,context );
14921501break ;
1502+ #if PG_VERSION_NUM >=120000
14931503case T_SubscriptingRef :
14941504deparseSubscriptingRef ((SubscriptingRef * )node ,context );
1505+ #else
1506+ case T_ArrayRef :
1507+ deparseArrayRef ((ArrayRef * )node ,context );
1508+ #endif
14951509break ;
14961510case T_FuncExpr :
14971511deparseFuncExpr ((FuncExpr * )node ,context );
@@ -1724,8 +1738,13 @@ deparseParam(Param *node, deparse_expr_cxt *context)
17241738/*
17251739 * Deparse an array subscript expression.
17261740 */
1741+ #if PG_VERSION_NUM >=120000
17271742static void
17281743deparseSubscriptingRef (SubscriptingRef * node ,deparse_expr_cxt * context )
1744+ #else
1745+ static void
1746+ deparseArrayRef (ArrayRef * node ,deparse_expr_cxt * context )
1747+ #endif
17291748{
17301749StringInfo buf = context -> buf ;
17311750ListCell * lowlist_item ;