Re: entry log

From: "Robin Helgelin" <lobbin(at)gmail(dot)com>
To: "PostgreSQL general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: entry log
Date: 2007-08-20 06:25:37
Message-ID: c014a9590708192325t44e1995fw1d526b491a888e17@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/19/07, Michael Glaesemann <grzm(at)seespotcode(dot)net> wrote:
> As you mention, you could use a trigger instead of explicitly setting
> updated_at to DEFAULT, which might be more convenient because you
> don't need remember to set the updated_at column explicitly on update.
>
> Whether or not this information is *interesting* is really up to the
> specifics of your application, rather than answerable in a general
> sense.

I'm thinking it's probably going to make more sense to have a
logging/history table. What's the use of seeing when an entry was
updated when you don't know what was updated anyway :).

I guess that could be solved with triggers, each table have a trigger
that fires on update and runs a stored procedure.

--
regards,
Robin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2007-08-20 06:57:14 pg_class.relfilenode for large tables
Previous Message Tom Lane 2007-08-20 03:30:24 Re: Searching for Duplicates and Hosed the System