Updating a date field

Поиск
Список
Период
Сортировка
От Dan C
Тема Updating a date field
Дата
Msg-id ajrkph$2qi0$1@news.hub.org
обсуждение исходный текст
Ответы Re: Updating a date field  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
I have a date field called "updated" with a default of now.
When I INSERT data it the field displays today's date.
My problem is when I UPDATE the row it doesn't change unless
I update the field manually like this:
UPDATE person SET email='doe@foo.com',updated='now()' WHERE
person_id=614486;
Is there an automatic way?
I tried doing it with a rule, which returned
ERROR:  query rewritten 10 times, may contain cycles
I tried a CONSTRAINT and TRIGGER without any luck either.
Can anyone help?



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

Предыдущее
От: "Ian Harding"
Дата:
Сообщение: Sorry...
Следующее
От: "Robert J. Sanford, Jr."
Дата:
Сообщение: PostgreSQL and MySQL in ZDNet article...