Thread: libpgtcl/pg_execute undocumented feature ?
I was just trying to implement a -numAffected option to pg_result to get the number of affected tuples when invoking INSERT/UPDATE/DELETE when I saw, that there is already a command that does give me the number of affected tuples. Will pg_execute be dropped in uncoming releases ? Gerhard Hintermayer
On 4 Oct 2002, (Gerhard Hintermayer) wrote: > I was just trying to implement a -numAffected option to pg_result to > get the number of affected tuples when invoking INSERT/UPDATE/DELETE > when I saw, that there is already a command that does give me the > number of affected tuples. Will pg_execute be dropped in uncoming > releases ? I don't see why it would be dropped. BTW, I've just noticed you say it's undocumented. I see it listed in chapter 3 of the Client Interfaces, that's the 'pgtcl - Tcl Binding Library' chapter for the 7.3 docmentation but not in my copy of the 7.2.1 documentation. So it's been documented now. However, taking the view that there is a split between application developer and database developer: the design of a DB can change without the application developer knowing anything other than suddenly an INSERT command, for exmaple, says zero tuples were affected. This generally results from the use of RULES and may not be a problem at all and may be even less of one in 7.4. However, I would tend to avoid building such reliance on the tuple count into an application and unless you really do need the count I would suggest it's best to avoid the question entirely. -- Nigel J. Andrews Director --- Logictree Systems Limited Computer Consultants
Nigel J. Andrews wrote: > On 4 Oct 2002, (Gerhard Hintermayer) wrote: > > > I was just trying to implement a -numAffected option to pg_result to > > get the number of affected tuples when invoking INSERT/UPDATE/DELETE > > when I saw, that there is already a command that does give me the > > number of affected tuples. Will pg_execute be dropped in uncoming > > releases ? > > I don't see why it would be dropped. > > BTW, I've just noticed you say it's undocumented. I see it listed in > chapter 3 of the Client Interfaces, that's the 'pgtcl - Tcl Binding Library' > chapter for the 7.3 docmentation but not in my copy of the 7.2.1 > documentation. So it's been documented now. Yes, someone already pointed out that doc item was missing so we added it to 7.3. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073