example of insert timestamp

Поиск
Список
Период
Сортировка
От David Bear
Тема example of insert timestamp
Дата
Msg-id 200802251821.19453.david.bear@asu.edu
обсуждение исходный текст
Ответы Re: example of insert timestamp  (Steve Holdoway <steve.holdoway@firetrust.com>)
Re: example of insert timestamp  ("Aaron Bono" <aaron.bono@aranya.com>)
Список pgsql-admin
I've been reading about triggers on insert and found the page at
http://www.postgresql.org/docs/8.1/interactive/triggers.html with some sample
code in the comments.

I'm thinking what I want can't really be this involved.

I want to have a table with a timestamp field that automatically gets the
value of now() on insert. The timestamp will never be updated. I assume I
need to create a trigger to do this. If there is an easier way, please
advise.

Otherwise, is there any sample code that would should be how to do this? The
sample on the page above looks like overkill.

--

David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Aaron Bono"
Дата:
Сообщение: Re: System in Recovery Mode
Следующее
От: Steve Holdoway
Дата:
Сообщение: Re: example of insert timestamp