Detecting changes to certain fields in 'before update' trigger functions
В списке pgsql-general по дате отправления:
| От | Sebastian Tennant |
|---|---|
| Тема | Detecting changes to certain fields in 'before update' trigger functions |
| Дата | |
| Msg-id | ljuzkjok.fsf@vps203.linuxvps.org обсуждение исходный текст |
| Ответы |
Re: Detecting changes to certain fields in 'before update' trigger functions
Re: Detecting changes to certain fields in 'before update' trigger functions |
| Список | pgsql-general |
Hi list, First steps in trigger functions and PL/pgSQL so please bear with me... How can one detect changes to certain fields in before update trigger functions? IF (NEW.<column-name> != OLD.<column-name>) THEN ... doesn't work, so obviously my understanding of the values of the varriables NEW and OLD in before update trigger functions is wrong; I had thought that OLD holds the record as it was before the update, and that NEW holds the record as it is since the update (but before the update has been committed)? How should one go about detecting changes to certain fields in before update trigger functions? Any help/advice much appreciated. Sebastian
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера