Search Postgresql Archives

Re: Updating

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

 



Would it be possible to get an example of such coding??

Bob


----- Original Message ----- From: "Adrian Klaver" <aklaver@xxxxxxxxxxx>
To: <pgsql-general@xxxxxxxxxxxxxx>
Cc: "Bob Pawley" <rjpawley@xxxxxxx>
Sent: Sunday, March 16, 2008 5:14 PM
Subject: Re:  Updating


On Sunday 16 March 2008 3:32 pm, Bob Pawley wrote:
Is there a method available for triggering a function after an update on a
particular column in a table?

The only way that I have found is to trigger after an update on the whole
table, which of course can lead to problems.

Bob

I trigger can be constrained to fire for each row. Inside the trigger function
you can test to see if the column in question has been updated and do the
appropriate thing. If the column has not been changed do nothing and RETURN
NEW which makes the function non-op.
--
Adrian Klaver
aklaver@xxxxxxxxxxx

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


--
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