Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2faa8e2

Browse files
committed
Have PL/pgSQL FETCH set DIAGNOSTICS ROW_COUNT.
Andrew Gierth
1 parent227f817 commit2faa8e2

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 sentdownto
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/0201:16:11 tgl Exp $
11+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.238 2009/04/0219: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
returnPLPGSQL_RC_OK;
33723374
}
33733375

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp