Re: After each row trigger NOT seeing data changes? - Mailing list pgsql-general

From Karl Nack
Subject Re: After each row trigger NOT seeing data changes?
Date
Msg-id alpine.DEB.1.10.0905211542150.13445@mindinao
Whole thread Raw
In response to Re: After each row trigger NOT seeing data changes?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
> The reason is that you've declared the function STABLE

Yes, that did it!

> I'm not sure if the cited portions of the manual ought to contain notes
> about this or not.  It seems a bit off-topic for them, but if other
> people have been bit by this, then maybe ... comments anyone?

Perhaps this should be documented on the page describing CREATE FUNCTION
(which is what I referenced when I wrote the function)?

In particular, the wording describing IMMUTABLE, STABLE VOLATILE doesn't
seem entirely accurate:

"STABLE ... is the appropriate selection for functions whose results
depend on database lookups, parameter variables (such as the current time
zone), etc."

Apparently not the case for after-update triggers that need to reference
the just-updated table.

Regardless, thank you very much for the help!


Karl Nack

Futurity, Inc.
773-506-2007



pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: After each row trigger NOT seeing data changes?
Next
From: Chris Browne
Date:
Subject: Re: Postgres, DB design, and object IDs (of any ilk)