test if update statement did anything in a transaction?

Поиск
Список
Период
Сортировка
От kg@kgb.une.edu.au (Klint Gore)
Тема test if update statement did anything in a transaction?
Дата
Msg-id 8b4d3c7a.0311021805.6e57c060@posting.google.com
обсуждение исходный текст
Список pgsql-novice
Is it possible to check if an update statement did anything in a
transaction?

ie
  begin;
  update table set intfield = intfield+1 where intfield >= 1;
  case rowsaffected > 0
     raise error;
  end;
  insert into table (intfield) values (1);
  commit;

in plpgsql there's the found variable to test.  is there an equivalent
in a transaction?

TIA,

klint.

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

Предыдущее
От: Antonios Christofides
Дата:
Сообщение: Surrogate vs natural keys (Was: Almost relational PostgreSQL (was: one-to-one))
Следующее
От: chameenz@yahoo.com (Matthew Cimino)
Дата:
Сообщение: Re: 1-2 second delay on all commands over network