Re: Old/New

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Old/New
Дата
Msg-id 5787.1264188413@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Old/New  ("Bob Pawley" <rjpawley@shaw.ca>)
Список pgsql-general
"Bob Pawley" <rjpawley@shaw.ca> writes:
> I haven't found any documentation on how the underlying structure of
> PostgreSQL actually operates. So I have had to extrapolate.

> I think what you are saying is that on an update of a field  the whole row
> which includes that field is affected to the extent that the whole row falls
> under the rules of New/Old.

In triggers, NEW and OLD are just rowtype variables that contain the
entire new and old versions of whatever row the ON UPDATE trigger was
fired for.  You do not have to look into the table to find out anything
else about the update event, and doing so is generally a bad idea
because it'll be much slower than just looking at NEW/OLD.

You might be confusing this with the use of NEW/OLD in rules, where they
have a rather different meaning.

            regards, tom lane

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

Предыдущее
От: "Bob Pawley"
Дата:
Сообщение: Re: Old/New
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Slow Query / Check Point Segments