Search Postgresql Archives

Re: getting the number of rows affected by a query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 16, 2007 at 09:00:46AM +0800, Ow Mun Heng wrote:
> I'm trying to do some periodic updates from another DB and would like to
> know the # of updates/inserts/deletes from that job.

Humm; it would be nice if you could use the new RETURNING construct
that's been introduced in 8.2, i.e. something like:

  SELECT COUNT(*) FROM (
    DELETE FROM foo RETURNING 1) x;

However PG doesn't seem to support this.  It seems logical to support
this construct now that RETURNING has been incorporated.  There's
probably something obvious that I'm missing here though.


  Sam

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux