Re: libpgtcl/pg_execute undocumented feature ?

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: "(Gerhard Hintermayer)" <g(dot)hintermayer(at)inode(dot)at>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpgtcl/pg_execute undocumented feature ?
Date: 2002-10-04 12:01:29
Message-ID: Pine.LNX.4.21.0210041245550.22900-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Vilson farias 2002-10-04 12:32:31 Postgres Object Identifiers
Previous Message Gerhard Hintermayer 2002-10-04 10:16:33 libpgtcl/pg_execute undocumented feature ?