Re: getting the number of rows affected by a query

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: getting the number of rows affected by a query
Дата
Msg-id 20071116100232.GN1955@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на getting the number of rows affected by a query  (Ow Mun Heng <Ow.Mun.Heng@wdc.com>)
Ответы Re: getting the number of rows affected by a query
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Ow Mun Heng
Дата:
Сообщение: Re: getting the number of rows affected by a query
Следующее
От: Sam Mason
Дата:
Сообщение: Re: Common criteria evaluation?