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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 3 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy