How to retrieve how many rows are affected after doing an INSERT statement - Mailing list pgsql-interfaces

From jing han
Subject How to retrieve how many rows are affected after doing an INSERT statement
Date
Msg-id 20050412154124.83434.qmail@web53502.mail.yahoo.com
Whole thread Raw
Responses Re: How to retrieve how many rows are affected after doing an INSERT statement
Re: How to retrieve how many rows are affected after doing an INSERT statement
List pgsql-interfaces
Hello,

When we use PostgreSQL with Perl, we can retrieve
Error messages from database handler, say, if my
database handler is presented as $dbh, then I use
$dbh->errstr() can get error message like:

ERROR: Cannot insert a duplicate key into unique index
a_dbtable_pkey.

Is there a way to retriever from $dbh how many rows
are affected after doing an insert statement, and how
to present this? 

I tried $dbh->rowcount(), it doesn't work, So what's
the exact expression?

Any help will be appreciated.


jing 

    
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 


pgsql-interfaces by date:

Previous
From: mps@theintraweb.net
Date:
Subject: Re: pg.py under Mac OS X
Next
From: Michael Fuhr
Date:
Subject: Re: How to retrieve how many rows are affected after doing an INSERT statement