Q:Update Rule

From: "Detlef Boddin S/N O(dot)21" <boddin(at)teleport(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Q:Update Rule
Date: 1998-09-21 10:00:47
Message-ID: 360623CF.DD9A03E1@teleport.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I want to save the user and date in a row when the user changed it.
If I use an update rule, how can I prevent a loop ?

Bad example:

create rule r_changed
as on update to requesttable
do update requesttable
set changed_by = current_user,
date_of_last_change = current_date;

What is better ?

Detlef

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Sferacarta Software 1998-09-21 13:53:51 Re: [SQL] Q:Update Rule
Previous Message Bruce Momjian 1998-09-21 01:39:33 Re: [SQL] How to Make Case InSensitive???