Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 78fab84

Browse files
committed
Remove extra increment of plpgsql's statement counter for FOR loops.
This left gaps in the internal statement numbering, which is not terribly harmful (else we'd have noticed sooner), but it's not great either. Oversight in bbd5c20; backpatch to v12 where that came in. Pavel Stehule Discussion: https://postgr.es/m/CAFj8pRDXyQaJmpotNTQVc-t-WxdWZC35V2PnmwOaV1-taidFWA@mail.gmail.com
1 parent 7428469 commit 78fab84

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/pl/plpgsql/src/pl_gram.y

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,6 @@ stmt_for : opt_loop_label K_FOR for_control loop_body
13041304

13051305
new = (PLpgSQL_stmt_fori *) $3;
13061306
new->lineno = plpgsql_location_to_lineno(@2);
1307-
new->stmtid = ++plpgsql_curr_compile->nstatements;
13081307
new->label = $1;
13091308
new->body = $4.stmts;
13101309
$$ = (PLpgSQL_stmt *) new;
@@ -1319,7 +1318,6 @@ stmt_for : opt_loop_label K_FOR for_control loop_body
13191318
/* forq is the common supertype of all three */
13201319
new = (PLpgSQL_stmt_forq *) $3;
13211320
new->lineno = plpgsql_location_to_lineno(@2);
1322-
new->stmtid = ++plpgsql_curr_compile->nstatements;
13231321
new->label = $1;
13241322
new->body = $4.stmts;
13251323
$$ = (PLpgSQL_stmt *) new;

0 commit comments

Comments
 (0)