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

Commit80e6d99

Browse files
committed
Add -cmdTuples to tcl interface.
1 parent7fb0d91 commit80e6d99

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

‎doc/src/sgml/libpgtcl.sgml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,16 @@ the number of tuples returned by the query.
728728
</VARLISTENTRY>
729729
<VARLISTENTRY>
730730
<TERM>
731+
<option>-cmdTuples</option>
732+
</TERM>
733+
<LISTITEM>
734+
<PARA>
735+
the number of tuples affected by the query.
736+
</PARA>
737+
</LISTITEM>
738+
</VARLISTENTRY>
739+
<VARLISTENTRY>
740+
<TERM>
731741
<option>-numAttrs</option>
732742
</TERM>
733743
<LISTITEM>

‎src/interfaces/libpgtcl/pgtclCmds.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.69 2002/10/17 14:51:50 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.70 2002/11/26 21:38:49 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -506,6 +506,8 @@ Pg_exec(ClientData cData, Tcl_Interp *interp, int argc, char *argv[])
506506
507507
-numTuplesthe number of tuples in the query
508508
509+
-cmdTuplesthe number of tuples affected by the query
510+
509511
-numAttrsreturns the number of attributes returned by the query
510512
511513
-assign arrayName
@@ -591,6 +593,11 @@ Pg_result(ClientData cData, Tcl_Interp *interp, int argc, char *argv[])
591593
sprintf(interp->result,"%d",PQntuples(result));
592594
returnTCL_OK;
593595
}
596+
elseif (strcmp(opt,"-cmdTuples")==0)
597+
{
598+
sprintf(interp->result,"%s",PQcmdTuples(result));
599+
returnTCL_OK;
600+
}
594601
elseif (strcmp(opt,"-numAttrs")==0)
595602
{
596603
sprintf(interp->result,"%d",PQnfields(result));
@@ -768,6 +775,7 @@ Pg_result(ClientData cData, Tcl_Interp *interp, int argc, char *argv[])
768775
"\t-conn\n",
769776
"\t-oid\n",
770777
"\t-numTuples\n",
778+
"\t-cmdTuples\n",
771779
"\t-numAttrs\n"
772780
"\t-assign arrayVarName\n",
773781
"\t-assignbyidx arrayVarName ?appendstr?\n",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp