Set flag column on update if other columns change?

From: Steve Wampler <swampler(at)noao(dot)edu>
To: Postgres-SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Set flag column on update if other columns change?
Date: 2014-05-27 16:00:03
Message-ID: 5384B683.9030505@noao.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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(at)noao(dot)edu
The gods that smiled on your birth are now laughing out loud.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas Kretschmer 2014-05-27 16:21:57 Re: Set flag column on update if other columns change?
Previous Message Dariyoosh Dariyoosh 2014-05-27 12:50:40 Re: Question about Array data type in PostgreSQL and their link with hash table concept