pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Detlef Boddin S/N O.21 <boddin@teleport.de>
To: pgsql-sql@postgresql.org
Subject: Q:Update Rule
Date: Mon, 21 Sep 1998 09:00:47 -0100
Message-ID: <360623CF.DD9A03E1@teleport.de> (raw)

 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






view thread (2+ messages)  latest in thread

Message-ID: <360623CF.DD9A03E1@teleport.de>
Permalink:  ../360623CF.DD9A03E1@teleport.de/
Also on:    postgresql.org/message-id/360623CF.DD9A03E1@teleport.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: boddin@teleport.de
  Subject: Re: Q:Update Rule
  In-Reply-To: <360623CF.DD9A03E1@teleport.de>
  References: <360623CF.DD9A03E1@teleport.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox