| От | Steve Wampler |
|---|---|
| Тема | Re: Set flag column on update if other columns change? |
| Дата | |
| Msg-id | 5384BBE5.5020409@noao.edu обсуждение исходный текст |
| Ответ на | Re: Set flag column on update if other columns change? (Andreas Kretschmer <andreas@a-kretschmer.de>) |
| Список | pgsql-sql |
On 05/27/2014 09:21 AM, Andreas Kretschmer wrote: >> Steve Wampler <swampler@noao.edu> hat am 27. Mai 2014 um 18:00 geschrieben: >> I've got a table where updates that actually change things need to >> record in the row that the row has been modified. I'm assuming that a >> trigger function (OK to be plpgsql, performance isn't much of >> an issue) is the best way to do this, but haven't done much >> with trigger functions. Can someone give me some pointers >> on how this might be accomplished? I have to check for >> changes in a subset of the columns (e.g. ignore timestamps, etc.). > > Trigger BEFORE, compare NEW. with OLD.. Easy. Thanks! I didn't know about OLD... -- Steve Wampler -- swampler@noao.edu The gods that smiled on your birth are now laughing out loud.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера