Skip to content

Commit

Permalink
Revert "Fix nesting level counting for older PG version"
Browse files Browse the repository at this point in the history
This reverts commit 3e91da8.
  • Loading branch information
artemgavrilov committed Jun 11, 2024
1 parent 3e91da8 commit 7a5add3
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions pg_stat_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,8 +1233,6 @@ pgsm_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
* To be absolutely certain we don't mess up the nesting level,
* evaluate the bump_level condition just once.
*/

#if PG_VERSION_NUM >= 17000
bool bump_level =
!IsA(parsetree, ExecuteStmt) &&
!IsA(parsetree, PrepareStmt) &&
Expand All @@ -1245,8 +1243,6 @@ pgsm_ProcessUtility(PlannedStmt *pstmt, const char *queryString,

PG_TRY();
{
#endif

#if PG_VERSION_NUM >= 140000
if (prev_ProcessUtility)
prev_ProcessUtility(pstmt, queryString,
Expand Down Expand Up @@ -1283,8 +1279,6 @@ pgsm_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
dest,
completionTag);
#endif

#if PG_VERSION_NUM >= 17000
if (bump_level)
nesting_level--;
}
Expand All @@ -1296,7 +1290,6 @@ pgsm_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
}
PG_END_TRY();
}
#endif
}

#if PG_VERSION_NUM < 130000
Expand Down

0 comments on commit 7a5add3

Please sign in to comment.