Re: Create a function that updates the record with and timestamps
В списке pgsql-general по дате отправления:
| От | A. Kretschmer |
|---|---|
| Тема | Re: Create a function that updates the record with and timestamps |
| Дата | |
| Msg-id | 20100322171400.GA14658@a-kretschmer.de обсуждение |
| Ответ на | Create a function that updates the record with and timestamps (Chris Barnes <compuguruchrisbarnes@hotmail.com>) |
| Ответы |
Re: Create a function that updates the record with and
timestamps
|
| Список | pgsql-general |
In response to Chris Barnes : > I would like to have postgres update the last_modified column with the > current_date on an update of the record. > > I am not sure if there is a very simple way of doing this? > > Or, do I need to create a function and a trigger to call the row and update > with new data and set the last_modified to current_date? Yes, that's the way, a TRIGGER on UPDATE for each row. I think, the doc contains an example. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера