Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2faa8e2

Browse files
committed
Have PL/pgSQL FETCH set DIAGNOSTICS ROW_COUNT.
Andrew Gierth
1 parent 227f817 commit 2faa8e2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

doc/src/sgml/plpgsql.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.138 2009/02/05 15:25:49 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.139 2009/04/02 19:20:45 momjian Exp $ -->
22

33
<chapter id="plpgsql">
44
<title><application>PL/pgSQL</application> - <acronym>SQL</acronym> Procedural Language</title>
@@ -1285,7 +1285,7 @@ GET DIAGNOSTICS <replaceable>variable</replaceable> = <replaceable>item</replace
12851285
value to be assigned to the specified variable (which should be
12861286
of the right data type to receive it). The currently available
12871287
status items are <varname>ROW_COUNT</>, the number of rows
1288-
processed by the last <acronym>SQL</acronym> command sent down to
1288+
processed by the last <acronym>SQL</acronym> command sent to
12891289
the <acronym>SQL</acronym> engine, and <varname>RESULT_OID</>,
12901290
the OID of the last row inserted by the most recent
12911291
<acronym>SQL</acronym> command. Note that <varname>RESULT_OID</>

src/pl/plpgsql/src/pl_exec.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.237 2009/04/02 01:16:11 tgl Exp $
11+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.238 2009/04/02 19:20:45 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -3368,6 +3368,8 @@ exec_stmt_fetch(PLpgSQL_execstate *estate, PLpgSQL_stmt_fetch *stmt)
33683368
exec_set_found(estate, n != 0);
33693369
}
33703370

3371+
estate->eval_processed = n;
3372+
33713373
return PLPGSQL_RC_OK;
33723374
}
33733375

0 commit comments

Comments
 (0)