pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Leif B. Kristensen <leif@solumslekt.org>
To: pgsql-sql@postgresql.org
Subject: Triggers
Date: Tue, 22 Nov 2005 15:43:47 +0100
Message-ID: <200511221543.47979.leif@solumslekt.org> (raw)

I'm trying to understand triggers. I have read the documentation in the 
manual as well as the few pages in the Douglas book about the subject, 
but I don't see how to implement a trigger that simply updates a 
'last_edit' date field in my 'persons' table whenever I do an insert or 
update into my 'participants' table; that is a trigger that basically 
does an "UPDATE persons SET 'last_edit' = NOW() WHERE persons.person_id 
= participants.person_fk". Is that even possible?
-- 
Leif Biberg Kristensen | Registered Linux User #338009
http://solumslekt.org/ | Cruising with Gentoo/KDE



view thread (34+ messages)  latest in thread

Message-ID: <200511221543.47979.leif@solumslekt.org>
Permalink:  ../200511221543.47979.leif@solumslekt.org/
Also on:    postgresql.org/message-id/200511221543.47979.leif@solumslekt.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: leif@solumslekt.org
  Subject: Re: Triggers
  In-Reply-To: <200511221543.47979.leif@solumslekt.org>

* 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