Re: the behaviour of timestamp on postgres.

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: the behaviour of timestamp on postgres.
Дата
Msg-id 1092239632.28827.4.camel@coppola.ecircle.de
обсуждение исходный текст
Ответ на Re: the behaviour of timestamp on postgres.  (Prabu Subroto <prabu_subroto@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: How to know which queries are to be optimised?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: POSIX RE starting with a (