Re: getting the number of rows affected by a query

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


On Fri, 2007-11-16 at 10:22 +0100, Martijn van Oosterhout wrote:
> 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.
>

The question is on how to use this number to be inserted into a table
instead of just being informational.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2007-11-16 10:02:32 Re: getting the number of rows affected by a query
Previous Message Martijn van Oosterhout 2007-11-16 09:22:55 Re: getting the number of rows affected by a query