Re: Datestamps

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Bryan Irvine <bryan(dot)irvine(at)kingcountyjournal(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Datestamps
Date: 2004-01-09 20:52:52
Message-ID: 20040109205252.GA3704@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Fri, Jan 09, 2004 at 12:25:45 -0800,
Bryan Irvine <bryan(dot)irvine(at)kingcountyjournal(dot)com> wrote:
> On Fri, 2004-01-09 at 12:25, Bruno Wolff III wrote:
> > On Fri, Jan 09, 2004 at 11:45:17 -0800,
> > Bryan Irvine <bryan(dot)irvine(at)kingcountyjournal(dot)com> wrote:
> > > I am trying to figure out what day some things were entered into the
> > > DB. Is there a way to do that?
> >
> > Rows do not have timestamps associated with them. You might be able to make
> > some guesses using your logfile. If this is something you want for the
> > future you can add a timestamp field to your table and use a trigger to
> > keep it up to date.
>
> I do I do!
>
> What's the best way to create a field for tracking this?
> Is this in the FAQ somewhere?

I don't think there is an FAQ, but it has been discussed on the lists a
few times. You probably want to use a before trigger to set the timestamp
column to current_timestamp on inserts or updates.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bryan Irvine 2004-01-09 21:12:12 Re: Datestamps
Previous Message Bruno Wolff III 2004-01-09 20:25:17 Re: Datestamps