summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2009-04-02 19:20:45 +0000
committerBruce Momjian2009-04-02 19:20:45 +0000
commit8c3fca9713633c45497afab2d3c2f11987581540 (patch)
tree1b623472b6b40c3e26a07ede32a1218c45f4d32b
parentde6055145a423c5b8a0ae2e315d04149801dc55e (diff)
Have PL/pgSQL FETCH set DIAGNOSTICS ROW_COUNT.
Andrew Gierth
-rw-r--r--doc/src/sgml/plpgsql.sgml2
-rw-r--r--src/pl/plpgsql/src/pl_exec.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 9d66dd980d..1d066d30f1 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -1285,7 +1285,7 @@ GET DIAGNOSTICS <replaceable>variable</replaceable> = <replaceable>item</replace
value to be assigned to the specified variable (which should be
of the right data type to receive it). The currently available
status items are <varname>ROW_COUNT</>, the number of rows
- processed by the last <acronym>SQL</acronym> command sent down to
+ processed by the last <acronym>SQL</acronym> command sent to
the <acronym>SQL</acronym> engine, and <varname>RESULT_OID</>,
the OID of the last row inserted by the most recent
<acronym>SQL</acronym> command. Note that <varname>RESULT_OID</>
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index a6fe68505d..fbbd3f0422 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -3368,6 +3368,8 @@ exec_stmt_fetch(PLpgSQL_execstate *estate, PLpgSQL_stmt_fetch *stmt)
exec_set_found(estate, n != 0);
}
+ estate->eval_processed = n;
+
return PLPGSQL_RC_OK;
}