diff options
author | Bruce Momjian <bruce@momjian.us> | 2009-04-02 19:20:45 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2009-04-02 19:20:45 +0000 |
commit | 2faa8e2ac1059f570ce4bcfd7ae2cf002cbf0478 (patch) | |
tree | 9709a02afd09859e5157d5084982d09a8185e61f | |
parent | 227f817c1fc73958b0854809b9b7a4758b29cc42 (diff) | |
download | postgresql-2faa8e2ac1059f570ce4bcfd7ae2cf002cbf0478.tar.gz postgresql-2faa8e2ac1059f570ce4bcfd7ae2cf002cbf0478.zip |
Have PL/pgSQL FETCH set DIAGNOSTICS ROW_COUNT.
Andrew Gierth
-rw-r--r-- | doc/src/sgml/plpgsql.sgml | 4 | ||||
-rw-r--r-- | src/pl/plpgsql/src/pl_exec.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index db6d08fd69f..6eb9b2b9e7a 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.138 2009/02/05 15:25:49 momjian Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.139 2009/04/02 19:20:45 momjian Exp $ --> <chapter id="plpgsql"> <title><application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language</title> @@ -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 c6658fca357..588c2fe63b0 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; } |