Re: After each row trigger NOT seeing data changes?

From: Karl Nack <karlnack(at)futurityinc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: After each row trigger NOT seeing data changes?
Date: 2009-05-21 20:50:18
Message-ID: alpine.DEB.1.10.0905211542150.13445@mindinao
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2009-05-21 21:38:05 Re: Postgres, DB design, and object IDs (of any ilk)
Previous Message Raymond O'Donnell 2009-05-21 20:39:58 Re: After each row trigger NOT seeing data changes?