Update rule

From: Secrétariat <ets(at)rolland-fr(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Update rule
Date: 2004-12-30 17:35:23
Message-ID: 009e01c4ee96$7ad28aa0$0100a8c0@lrp43008
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pierre-Frédéric Caillaud 2004-12-30 18:08:20 Re: Update rule
Previous Message Scott Marlowe 2004-12-30 17:22:19 Re: pg_dump and pgpool