pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marius Andreiana <marius@wdg.ro>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Keeping information changes history
Date: 24 Jan 2002 20:32:57 +0200
Message-ID: <1011897177.2277.13.camel@aurora.wdg.ro> (raw)

Hi

I need to keep information changes history for people in our
application.
e.g. when their address was changed I need to remember who changed it
(staff or member), when and to what was changed.

I don't know what's the standard approach to this problem. I thought
of having another address table, say addresses_history, same structure
as usual table, but with some extra fields: type of user and user id who
made the change, and time stamp.

Every time a change is made to addresses table also insert the proper
record in addresses_history with a trigger. But I need to know
information about the user who changed it in database, not only the
application, so where to keep it?
So I should add other columns to addresses table for this (user id and
type of user)

Any suggestions for improving or confirmations that this approach will
do the job greatly appreciated!

-- 
Marius Andreiana
--
You don't have to go to jail for helping your neighbour
http://www.gnu.org/philosophy/




view thread (2+ messages)  latest in thread

Message-ID: <1011897177.2277.13.camel@aurora.wdg.ro>
Permalink:  ../1011897177.2277.13.camel@aurora.wdg.ro/
Also on:    postgresql.org/message-id/1011897177.2277.13.camel@aurora.wdg.ro

 · 

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: marius@wdg.ro
  Subject: Re: Keeping information changes history
  In-Reply-To: <1011897177.2277.13.camel@aurora.wdg.ro>

* 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