catch an 'update where false' ?

Поиск
Список
Период
Сортировка
От santiago
Тема catch an 'update where false' ?
Дата
Msg-id 42FCBC94.1060403@free.fr
обсуждение исходный текст
Ответы Re: catch an 'update where false' ?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список 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 по дате отправления:

Предыдущее
От: "Lane Van Ingen"
Дата:
Сообщение: SQL Newbie
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: catch an 'update where false' ?