Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BE283475C2B for ; Sat, 23 Nov 2002 10:44:42 -0500 (EST) Received: from moutvdom.kundenserver.de (moutvdom.kundenserver.de [195.20.224.130]) by postgresql.org (Postfix) with ESMTP id 11E38475C22 for ; Sat, 23 Nov 2002 10:44:42 -0500 (EST) Received: from [212.227.126.222] (helo=mrvdomng.kundenserver.de) by moutvdom.kundenserver.de with esmtp (Exim 3.35 #1) id 18FcSc-0004d5-00 for pgsql-interfaces@postgresql.org; Sat, 23 Nov 2002 16:44:46 +0100 Received: from [217.83.111.226] (helo=localhost.localdomain) by mrvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 18FcSb-0006cX-00 for pgsql-interfaces@postgresql.org; Sat, 23 Nov 2002 16:44:45 +0100 Content-Type: text/plain; charset="us-ascii" From: Artur Trzewik To: pgsql-interfaces@postgresql.org Subject: pgtcl has no coresponding function to PQcmdTuples Date: Sat, 23 Nov 2002 16:44:59 +0100 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200211231642.58326.artur2@xdobry.de> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/118 X-Sequence-Number: 3366 Hi! I have noticed that pg_result $handle -numTuples result always 0 after DELETE and UPDATE command I have taken a look in the source code of pgtcl and I see # file pgtclCmds.c else if (strcmp(opt, "-numTuples") == 0) { sprintf(interp->result, "%d", PQntuples(result)); return TCL_OK; } it works only for SELECT commands. There are no coresponding c-function call to PQcmdTuples that return what I need in this moment. I suggest to add new subcommand to pg_result -cmdTuples with new code else if (strcmp(opt, "-cmdTuples") == 0) { sprintf(interp->result, "%d", PQcmdTuples(result)); return TCL_OK; } (better were to use Tcl_GetIndexFromObj an not strcmp, sprintf(interp->result,...) is also unsafe and very historical It should be Tcl_SetObjResult(interp, Tcl_NewIntObj(PQcmdTuples(result))); It do not look good By the way. pgtcl uses very old tcl interface (up to version 7) using new interface would increase speed about 30-40%. It also do not carry about UTF in new Tcl (new means about 2 years). It hurts me to see that old tcl interfaces slow up tcl (and another say it is slow). I can upgrade it (I have done it for mysqltcl) if there are need for it. I need conntact to pgtcl maintainer/autor. best regards, Artur Trzewik