]> granicus.if.org Git - postgresql/commit
Fix bug in CONTINUE statement for PL/pgSQL: when we continue a loop,
authorNeil Conway <neilc@samurai.com>
Wed, 22 Jun 2005 07:28:47 +0000 (07:28 +0000)
committerNeil Conway <neilc@samurai.com>
Wed, 22 Jun 2005 07:28:47 +0000 (07:28 +0000)
commit738df437b277b0e5ed95e5a3bd3da9420839b9ec
treec28eb53263b53e28a6705e6a3945ba64c2bd2989
parent05db8b501b7807cf730a7c1b8a95d05ca694070b
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.
src/pl/plpgsql/src/pl_exec.c
src/test/regress/expected/plpgsql.out
src/test/regress/sql/plpgsql.sql