Re: number of affected rows in pgtcl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christian Traber <christian(at)traber-net(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: number of affected rows in pgtcl
Date: 2002-10-25 13:55:16
Message-ID: 22536.1035554116@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Christian Traber <christian(at)traber-net(dot)de> writes:
>> Doesn't pg_result provide a way to get that?

> No, pg_result -numTuples only returns the number of found rows of a
> select statement.

Um, you're right; there's no interface to PGcmdTuples in pg_result.
Perhaps there should be. But the short-term answer is to use pg_execute
instead of pg_exec. See
http://developer.postgresql.org/docs/postgres/pgtcl-pgexecute.html
(this unaccountably escaped being documented before 7.3, but it's
been there since 7.1 or so).

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2002-10-25 14:18:27 Re: postgresql 7.2.1 and smp ?
Previous Message Johnson, Shaunn 2002-10-25 13:53:19 lpad question