This patch improves the behavior of FOUND in PL/PgSQL. In Oracle,

Bruce Momjian <bruce@momjian.us>

Commit: ebe1be1321fb88d7c085d39e4f01efcd352ed119
Author: Bruce Momjian <bruce@momjian.us>
Date: 2002-08-20T05:28:24Z
Releases: 7.3.1
This patch improves the behavior of FOUND in PL/PgSQL. In Oracle,
FOUND is set whenever a SELECT INTO returns > 0 rows, *or* when an
INSERT, UPDATE, or DELETE affects > 0 rows. We implemented the first
part of this behavior, but not the second.

I also improved the documentation on the various situations in which
FOUND can be set (excluding inside FOR loops, which I still need to
think about), and added some regression tests for this behavior.

Neil Conway

Files

PathChange+/−
doc/src/sgml/plpgsql.sgml modified +60 −12
src/pl/plpgsql/src/pl_exec.c modified +129 −118
src/test/regress/expected/plpgsql.out modified +56 −0
src/test/regress/sql/plpgsql.sql modified +44 −0