From: Bruce Momjian Date: Thu, 2 Apr 2009 19:20:45 +0000 (+0000) Subject: Have PL/pgSQL FETCH set DIAGNOSTICS ROW_COUNT. X-Git-Tag: REL8_4_BETA1~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2faa8e2ac1059f570ce4bcfd7ae2cf002cbf0478;p=postgresql Have PL/pgSQL FETCH set DIAGNOSTICS ROW_COUNT. Andrew Gierth --- diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index db6d08fd69..6eb9b2b9e7 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -1,4 +1,4 @@ - + <application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language @@ -1285,7 +1285,7 @@ GET DIAGNOSTICS variable = itemROW_COUNT, the number of rows - processed by the last SQL command sent down to + processed by the last SQL command sent to the SQL engine, and RESULT_OID, the OID of the last row inserted by the most recent SQL command. Note that RESULT_OID diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index c6658fca35..588c2fe63b 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.237 2009/04/02 01:16:11 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.238 2009/04/02 19:20:45 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -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; }