Update rule - Mailing list pgsql-general

From Secrétariat
Subject Update rule
Date
Msg-id 009e01c4ee96$7ad28aa0$0100a8c0@lrp43008
Whole thread Raw
Responses Re: Update rule  (Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>)
List pgsql-general
Hello !
 
I wish to create a rule to write in records who and when modified them.
I wrote :
CREATE OR REPLACE RULE tarif_upd AS
   ON UPDATE TO tarifs
   DO ALSO
      UPDATE tarifs
            SET dmodtar = current_date, umodtar = current_user
      WHERE dmodtar <> current_date AND umodtar <> current_user ;
But I obtain an infinite recursion !
It seems not using the where clause ?
Is it a bug ?
How can I workaround ...
 
Best regards.
Luc

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: pg_dump and pgpool
Next
From: Pierre-Frédéric Caillaud
Date:
Subject: Re: Update rule