@@ -24,7 +24,6 @@ static void check_stmts(PLpgSQL_checkstate *cstate, List *stmts, int *closing, L
2424static PLpgSQL_stmt_stack_item * push_stmt_to_stmt_stack (PLpgSQL_checkstate * cstate );
2525static void pop_stmt_from_stmt_stack (PLpgSQL_checkstate * cstate );
2626static bool is_any_loop_stmt (PLpgSQL_stmt * stmt );
27- static bool is_inside_protected_block (PLpgSQL_stmt_stack_item * current );
2827static bool is_inside_exception_handler (PLpgSQL_stmt_stack_item * current );
2928static PLpgSQL_stmt * find_nearest_loop (PLpgSQL_stmt_stack_item * current );
3029static PLpgSQL_stmt * find_stmt_with_label (char * label , PLpgSQL_stmt_stack_item * current );
@@ -45,6 +44,12 @@ static void check_dynamic_sql(PLpgSQL_checkstate *cstate, PLpgSQL_stmt *stmt, PL
4544
4645#if PG_VERSION_NUM >= 110000
4746
47+ static bool is_inside_protected_block (PLpgSQL_stmt_stack_item * current );
48+
49+ #endif
50+
51+ #if PG_VERSION_NUM >= 110000
52+
4853static void
4954check_variable (PLpgSQL_checkstate * cstate , PLpgSQL_variable * var )
5055{
@@ -1588,6 +1593,8 @@ find_nearest_loop(PLpgSQL_stmt_stack_item *current)
15881593 return NULL ;
15891594}
15901595
1596+ #if PG_VERSION_NUM >= 110000
1597+
15911598/*
15921599 * Returns true, when some outer block handles exceptions.
15931600 * It is used for check of correct usage of COMMIT or ROLLBACK.
@@ -1611,6 +1618,8 @@ is_inside_protected_block(PLpgSQL_stmt_stack_item *current)
16111618 return false;
16121619}
16131620
1621+ #endif
1622+
16141623/*
16151624 * This is used for check of correct usage GET STACKED DIAGNOSTICS
16161625 */
0 commit comments