agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Steve Wampler <swampler@noao.edu>
To: Postgres-SQL <pgsql-sql@postgresql.org>
Subject: Set flag column on update if other columns change?
Date: Tue, 27 May 2014 09:00:03 -0700
Message-ID: <5384B683.9030505@noao.edu> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>


I've got a table where updates that actually change things need to
record in the row that the row has been modified.  I'm assuming that a
trigger function (OK to be plpgsql, performance isn't much of
an issue) is the best way to do this, but haven't done much
with trigger functions.  Can someone give me some pointers
on how this might be accomplished?  I have to check for
changes in a subset of the columns (e.g. ignore timestamps, etc.).

Thanks in advance!
Steve
-- 
Steve Wampler -- swampler@noao.edu
The gods that smiled on your birth are now laughing out loud.


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (3+ messages)  latest in thread

Message-ID: <5384B683.9030505@noao.edu>
Permalink:  ../5384B683.9030505@noao.edu/
Also on:    postgresql.org/message-id/5384B683.9030505@noao.edu

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: swampler@noao.edu
  Subject: Re: Set flag column on update if other columns change?
  In-Reply-To: <5384B683.9030505@noao.edu>

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

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