test if update statement did anything in a transaction?

From: kg(at)kgb(dot)une(dot)edu(dot)au (Klint Gore)
To: pgsql-novice(at)postgresql(dot)org
Subject: test if update statement did anything in a transaction?
Date: 2003-11-03 02:05:24
Message-ID: 8b4d3c7a.0311021805.6e57c060@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-novice by date

  From Date Subject
Next Message Cath Lawrence 2003-11-03 04:17:37 SQL question
Previous Message MaFa 2003-11-01 16:13:54 Update cursor - current of