Create Rule

Поиск
Список
Период
Сортировка
От Luc ROLLAND
Тема Create Rule
Дата
Msg-id 000c01c3f590$e9809640$0100a8c0@lrp42600
обсуждение исходный текст
Ответы Re: Create Rule
Список pgsql-novice
Hello !
 
I would use a rule to store in each modified records the name of the user and the date of modification.
I try :

CREATE RULE shoe_mod AS ON UPDATE TO shoe_data
  DO INSTEAD UPDATE shoe_data
    SET shoename = NEW.shoename,
       sh_avail = NEW.sh_avail,
       slcolor = NEW.slcolor,
       slminlen = NEW.slminlen,
       slmaxlen = NEW.slmaxlen,
       slunit = NEW.slunit,
       shuser = current_user,
       shdatmod = current_date
  WHERE shoename = OLD.shoename ;
 
but I obtain an infinite loop ...
How can I do that.
 
Best regards.
 
Luc ROLLAND

В списке pgsql-novice по дате отправления: