Re: Update Trigger Inconsistency with 7.1?

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: "Martin A. Marques"
Дата:
Сообщение: Re: PostgreSQL 7 on Redhat 6.1
Следующее
От: "Dan Wilson"
Дата:
Сообщение: Weird View behavior