git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5c0f7cc)
Remove extra increment of plpgsql's statement counter for FOR loops.
Tue, 2 Feb 2021 19:35:12 +0000 (14:35 -0500)
Tue, 2 Feb 2021 19:35:12 +0000 (14:35 -0500)
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 bbd5c207b; backpatch to v12 where that came in.

Pavel Stehule

Discussion: https://postgr.es/m/CAFj8pRDXyQaJmpotNTQVc-t-WxdWZC35V2PnmwOaV1-taidFWA@mail.gmail.com


diff --git a/src/pl/plpgsql/src/pl_gram.y b/src/pl/plpgsql/src/pl_gram.y
index abf196d4be14964216349d56de43a17b171c2541..34e0520719fea280fa03dab03458ce8ff3ff0f37 100644 (file)
--- a/src/pl/plpgsql/src/pl_gram.y
+++ b/src/pl/plpgsql/src/pl_gram.y
@@ -1341,7 +1341,6 @@ stmt_for : opt_loop_label K_FOR for_control loop_body
new = (PLpgSQL_stmt_fori *) 3ドル;
new->lineno = plpgsql_location_to_lineno(@2);
- new->stmtid = ++plpgsql_curr_compile->nstatements;
new->label = 1ドル;
new->body = 4ドル.stmts;
$$ = (PLpgSQL_stmt *) new;
@@ -1356,7 +1355,6 @@ stmt_for : opt_loop_label K_FOR for_control loop_body
/* forq is the common supertype of all three */
new = (PLpgSQL_stmt_forq *) 3ドル;
new->lineno = plpgsql_location_to_lineno(@2);
- new->stmtid = ++plpgsql_curr_compile->nstatements;
new->label = 1ドル;
new->body = 4ドル.stmts;
$$ = (PLpgSQL_stmt *) new;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /