Re: the behaviour of timestamp on postgres. - Mailing list pgsql-general

From Csaba Nagy
Subject Re: the behaviour of timestamp on postgres.
Date
Msg-id 1092239632.28827.4.camel@coppola.ecircle.de
Whole thread Raw
In response to Re: the behaviour of timestamp on postgres.  (Prabu Subroto <prabu_subroto@yahoo.com>)
List pgsql-general
Prabu,

Be aware that this will only work for inserts, and updating the row will
not automatically update the timestamp column. You will have to do it
yourself if you need that, either by using the right query (which is
actually a preferred solution).
Automatically you could do it through a rule - but I have never used the
Postgres rule system, so I don't know how to do that.
The update trigger posted in another reply will also work.

HTH,
Csaba.

On Wed, 2004-08-11 at 16:47, Prabu Subroto wrote:
> It's solved.
>
> Thank you very much, Doug.
>
> Thanks.
> --- Doug McNaught <doug@mcnaught.org> wrote:
>
> > Prabu Subroto <prabu_subroto@yahoo.com> writes:
> >
> > > How can I make the postgres complete the value of
> > the
> > > timestamp field automatically?
> >
> > Add a DEFAULT NOW() clause to the column definition.
> >
> >
> > -Doug
> > --
> > Let us cross over the river, and rest under the
> > shade of the trees.
> >    --T. J. Jackson, 1863
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: How to know which queries are to be optimised?
Next
From: Michael Fuhr
Date:
Subject: Re: POSIX RE starting with a (