catch an 'update where false' ? - Mailing list pgsql-sql

From santiago
Subject catch an 'update where false' ?
Date
Msg-id 42FCBC94.1060403@free.fr
Whole thread Raw
Responses Re: catch an 'update where false' ?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-sql
hello

I' trying to catch un update that fails to update because no row matchs
the where clause:

for instance:
update t set c=1 where cc=2;
--and no row with cc=2

I would like to perform a
insert into t (c) values 1;
before the update is resolved

I hoped a trigger before update could help me, but it seems
that if where clause evals to false, triggers are not called..

someone knows a way around this ?

thanks


pgsql-sql by date:

Previous
From: "Lane Van Ingen"
Date:
Subject: SQL Newbie
Next
From: Alvaro Herrera
Date:
Subject: Re: catch an 'update where false' ?