Re: getting the number of rows affected by a query

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: getting the number of rows affected by a query
Date: 2007-11-16 09:22:55
Message-ID: 20071116092255.GD31271@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Nov 16, 2007 at 09:00:46AM +0800, Ow Mun Heng wrote:
> I usually write a function which gets/uses the GETS DIAGNOSTIC ROW COUNT
> parameter which will tell me how many rows were affected by the query.
>
> Now, for this case, I'm not writing a function but merely using a normal
> SQL eg:

The server provides the number of changed rows in its response. Like
DELETE 2030. So check whatever you're using to run the commands.

Have a ncie day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ow Mun Heng 2007-11-16 09:26:00 Re: getting the number of rows affected by a query
Previous Message Wolfgang Keller 2007-11-16 09:07:26 Composite types for composite primary/foreign keys?