Re: the behaviour of timestamp on postgres.

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Prabu Subroto <prabu_subroto(at)yahoo(dot)com>
Cc: Postgres General Milis <pgsql-general(at)postgresql(dot)org>
Subject: Re: the behaviour of timestamp on postgres.
Date: 2004-08-11 15:53:53
Message-ID: 1092239632.28827.4.camel@coppola.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mcnaught(dot)org> wrote:
>
> > Prabu Subroto <prabu_subroto(at)yahoo(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-08-11 16:02:07 Re: Replication options?
Previous Message Michael Fuhr 2004-08-11 15:34:52 Re: POSIX RE starting with a (