@@ -347,21 +347,39 @@ void McxtStatsInternal(MemoryContext context, int level,
347347#endif
348348
349349
350+ /*
351+ * parse_analyze()
352+ *
353+ * for v10 cast first arg to RawStmt type
354+ */
355+ #if PG_VERSION_NUM >= 100000
356+ #define parse_analyze_compat (parse_tree , query_string , param_types , nparams , \
357+ query_env ) \
358+ parse_analyze((RawStmt *) (parse_tree), (query_string), (param_types), \
359+ (nparams), (query_env))
360+ #elif PG_VERSION_NUM >= 90500
361+ #define parse_analyze_compat (parse_tree , query_string , param_types , nparams , \
362+ query_env ) \
363+ parse_analyze((Node *) (parse_tree), (query_string), (param_types), \
364+ (nparams))
365+ #endif
366+
367+
350368/*
351369 * pg_analyze_and_rewrite
352370 *
353371 * for v10 cast first arg to RawStmt type
354372 */
355373#if PG_VERSION_NUM >= 100000
356- #define pg_analyze_and_rewrite_compat (parsetree , query_string , paramTypes , \
357- numParams , queryEnv ) \
374+ #define pg_analyze_and_rewrite_compat (parsetree , query_string , param_types , \
375+ nparams , query_env ) \
358376 pg_analyze_and_rewrite((RawStmt *) (parsetree), (query_string), \
359- (paramTypes ), (numParams ), (queryEnv ))
377+ (param_types ), (nparams ), (query_env ))
360378#elif PG_VERSION_NUM >= 90500
361- #define pg_analyze_and_rewrite_compat (parsetree , query_string , paramTypes , \
362- numParams , queryEnv ) \
379+ #define pg_analyze_and_rewrite_compat (parsetree , query_string , param_types , \
380+ nparams , query_env ) \
363381 pg_analyze_and_rewrite((Node *) (parsetree), (query_string), \
364- (paramTypes ), (numParams ))
382+ (param_types ), (nparams ))
365383#endif
366384
367385
0 commit comments