Re: pg_affected Change Request

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: pg_affected Change Request
Дата
Msg-id 20050215003832.GA31790@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: pg_affected Change Request  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
On Thu, Feb 10, 2005 at 10:31:40AM -0700, Michael Fuhr wrote:
>
> UPDATE tablename SET col1 = <col1value>, col2 = <col2value>, ...
> WHERE keycol = <keyvalue>
>   AND (col1 IS DISTINCT FROM <col1value> OR
>        col2 IS DISTINCT FROM <col2value> ...)

You could also do this with a trigger.  If all columns in the old
and new rows are identical, then the trigger would return NULL to
skip the update for that row.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

В списке pgsql-general по дате отправления:

Предыдущее
От: "Gregory S. Williamson"
Дата:
Сообщение: Re: Privileges question
Следующее
От: Jeff Davis
Дата:
Сообщение: random record from small set