Received: from amber.wdg.ro ([193.231.212.69]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0OIOLl25331 for ; Thu, 24 Jan 2002 13:24:21 -0500 (EST) (envelope-from marius@wdg.ro) Received: from [192.168.1.8] (aurora.wdg.ro [192.168.1.8]) by amber.wdg.ro (8.9.3/8.9.3) with ESMTP id UAA13869 for ; Thu, 24 Jan 2002 20:24:21 +0200 Subject: Keeping information changes history From: Marius Andreiana To: pgsql-sql Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.1 (1.0.1-1) Date: 24 Jan 2002 20:32:57 +0200 Message-Id: <1011897177.2277.13.camel@aurora.wdg.ro> Mime-Version: 1.0 X-Archive-Number: 200201/275 X-Sequence-Number: 6359 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/