Search Postgresql Archives

Re: Implementing a change log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 19 September 2005 01:29, Mike Rylander wrote:
> On 9/18/05, Michael Schuerig <michael@xxxxxxxxxxx> wrote:
> > In my current project I have a customer requirement for
> > implementing a change log. This is not just for auditing purposes,
> > rather it is meant to be accessible by users so they can get an
> > overview of the change history of an object. The entire data set is
> > not big, I'm expecting considerably less than 50.000 records.
> > Changes are only made by about 30 human users.
>
> Will you need to tell who made what changes?  If so, you'll probably
> want each user to be a fully fledged Postgres users.

Yes, but that's a thing I can easily handle at application/framework 
level, whereas using multiple Pg users would be difficult.

[single set vs. working set and audit set]

> Keeping a single set of tables can get pretty complex.  You'd need to
> mask each table with a view and a set of rules for working with only
> the newest version of each record.  I always set up as separate set
> of audit tables to record the old versions of each row.
>
> > Can anyone relate their experiences with such a thing? Which
> > approaches should I take into consideration?
>
> I blogged about my most recent incarnation of "audit tables" here:
> http://open-ils.org/blog/?p=28 .  We don't use Postgres users (we
> have 2 million), but it would be trivial to modify what I've done
> there to work with real PG users or any other particulars of your
> environment.

Thanks. I'll have to read up on PL/PgSQL to understand your code, but 
that's something I intended to do anyway.

Michael

-- 
Michael Schuerig                       All good people read good books
mailto:michael@xxxxxxxxxxx                Now your conscience is clear
http://www.schuerig.de/michael/ --Tanita Tikaram, Twist In My Sobriety

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux