Search Postgresql Archives

Re: Old/New

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Bob Pawley" <rjpawley@xxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux