catch an 'update where false' ?

From: santiago <chetzacoalt(at)free(dot)fr>
To: pgsql-sql(at)postgresql(dot)org
Subject: catch an 'update where false' ?
Date: 2005-08-12 15:13:24
Message-ID: 42FCBC94.1060403@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Herrera 2005-08-12 15:27:58 Re: catch an 'update where false' ?
Previous Message Lane Van Ingen 2005-08-12 15:09:00 SQL Newbie