You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql: fix infinite loop in prepare/execute of PL/pgSQL loop
We recently added unconditional copying for the body of a routine during
placeholder assignment in #141596. However, we missed that a routine can
recursively invoke itself, leading to an infinite loop during the copy.
This commit fixes the bug by keeping track of which recursive routine
definitions have been seen so far during the copying of the expression
tree, and short-circuiting if one has already been seen.
Fixes#144020
Release note (bug fix): Fixed a bug that could cause a stack overflow
during execution of a prepared statement that invoked a PL/pgSQL routine
with a loop. The bug existed in versions v23.2.22, v24.1.15, v24.3.9,
v25.1.2, v25.1.3, and pre-release versions of 25.2 prior to v25.2.0-alpha.3.
0 commit comments