Fix bug in CONTINUE statement for PL/pgSQL: when we continue a loop,

Neil Conway <neilc@samurai.com>

Commit: 738df437b277b0e5ed95e5a3bd3da9420839b9ec
Author: Neil Conway <neilc@samurai.com>
Date: 2005-06-22T07:28:47Z
Releases: 8.1.0
Fix bug in CONTINUE statement for PL/pgSQL: when we continue a loop,
we need to be careful to reset rc to PLPGSQL_RC_OK, depending on how
the loop's logic is structured. If we continue a loop but it then
exits without executing the loop's body again, we want to return
PLPGSQL_RC_OK to our caller.  Enhance the regression tests to catch
this problem. Per report from Michael Fuhr.

Files

PathChange+/−
src/pl/plpgsql/src/pl_exec.c modified +26 −21
src/test/regress/expected/plpgsql.out modified +39 −1
src/test/regress/sql/plpgsql.sql modified +27 −1