Re: history table

From: "Robin Helgelin" <lobbin(at)gmail(dot)com>
To: "PostgreSQL general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: history table
Date: 2007-08-22 05:35:32
Message-ID: c014a9590708212235w18816f5bq5cd8ac99704d2e33@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/21/07, Guy Rouillier <guyr-ml1(at)burntmail(dot)com> wrote:
> Well, I can't find a way to set a variable associated with a connection,
> so probably the easiest thing to do is to add an "updated_by" column to
> your regular table (i.e., the non-history version.) Then just include
> the userid from your webapp as the value for that column. Your history
> table can then be updated by just copying the entire row from the base
> table whenever an insert or update occurs.

Yes, I think this will be the easiest way, thanks!

--
regards,
Robin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-08-22 05:40:30 Re: Converting non-null unique idx to pkey
Previous Message Trinath Somanchi 2007-08-22 04:59:59 Pgcluster 1.7 Fail safe !!!