Thread: test if update statement did anything in a transaction?

test if update statement did anything in a transaction?

From
kg@kgb.une.edu.au (Klint Gore)
Date:
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.