Re: How to find the number of rows deleted

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Andrus <eetasoft(at)online(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to find the number of rows deleted
Date: 2005-07-18 13:57:44
Message-ID: F7423AA4-1583-4BB7-B92B-9E8844E8570D@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Jul 18, 2005, at 7:00 AM, Andrus wrote:

> I ran DELETE command from my ODBC client application.
> I want to get the number of rows deleted by this DELETE command.
>
> I read the DELETE command docs but havent found any function.
>
> Any idea ?

I don't use ODBC, but you should get that directly back from the
DELETE command. Is there not a way to get the command return value
with your ODBC driver?

From the DELETE docs:

Outputs

On successful completion, a DELETE command returns a command tag of
the form

DELETE count
The count is the number of rows deleted. If count is 0, no rows
matched the condition (this is not considered an error).

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2005-07-18 14:15:21 Re: TRUNCATE locking problem
Previous Message Tom Lane 2005-07-18 13:51:43 Re: How to find the number of rows deleted