Skip to content

Commit

Permalink
Remove saved_queryId variable.
Browse files Browse the repository at this point in the history
This variable is unused on pg13 and below, which leads to spurious warnings.

Since that variable is only used once and since the saved value is never
overwritten, simply use the target value.
  • Loading branch information
rjuju committed Jan 19, 2025
1 parent 7a835ce commit aed2432
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pg_store_plans.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,10 +1120,9 @@ pgsp_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
DestReceiver *dest, COMPTAG_TYPE *completionTag)
{
int tag = nodeTag(pstmt->utilityStmt);
queryid_t saved_queryId = pstmt->queryId;
bool reset_force_disabled = false;

if (pgsp_enabled(saved_queryId) &&
if (pgsp_enabled(pstmt->queryId) &&
(tag == T_CreateExtensionStmt || tag == T_AlterExtensionStmt) &&
!force_disabled && track_level < TRACK_LEVEL_VERBOSE)
{
Expand Down

0 comments on commit aed2432

Please sign in to comment.