| От | Gregory Wood |
|---|---|
| Тема | Re: Update Trigger Inconsistency with 7.1? |
| Дата | |
| Msg-id | 001201c087d4$8becc3a0$7889ffcc@comstock.com обсуждение исходный текст |
| Ответ на | Update Trigger Inconsistency with 7.1? ("Gregory Wood" <gregw@com-stock.com>) |
| Список | pgsql-general |
> You can detect whether a field is actually being *changed* by comparing > NEW.field and OLD.field. You cannot distinguish the case where the > UPDATE didn't mention a field from the case where it did but assigned > the same value that was already there (eg UPDATE foo SET x = x). > This behavior was not different in 7.0. I had thought that I tested by trying update statements where the field wasn't specified. I suppose I probably am overlooking some other fact that was causing it to fail, but I could've sworn... I suppose I'll have to NULL out the field on INSERTs and UPDATEs, or push it into yet another field, then check for NULLness every time to verify that it's updated. Sigh. Greg
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера