Re: timestamps

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: timestamps
Дата
Msg-id 878yfgc7st.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на timestamps  (Tom Allison <tallison@tacocat.net>)
Ответы Re: timestamps  (Tom Allison <tallison@tacocat.net>)
Список pgsql-general
Tom Allison <tallison@tacocat.net> writes:

> How would I specify a field that's to be updated to current_time
> everytime the row is created/altered?

Create a trigger.  There are some good examples in the PL/pgSQL docs.

> Is there some way to put this 'update' property into the table instead
> of running some query to do it?

Triggers are the way to go in Postgres.

-Doug

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

Предыдущее
От: Tom Allison
Дата:
Сообщение: timestamps
Следующее
От: Larry Rosenman
Дата:
Сообщение: Re: timestamps