Thread: Writing Python triggers and the TD dictionary value

Writing Python triggers and the TD dictionary value

From
"Curt Schwaderer"
Date:
I can't figure out the plpython syntax to use the TD dictionary values. For example, say I have a column "foo" in table X that has a python trigger defined for it.
The documentation says that TD["old"] will have the original value of the row and TD["new"] will have the new value of the row. I want to get column foo out of TD["old"] and TD["new"]. But everything I try gives me an error:
 
TD["old"][foo]
TD["old"].foo
TD["old"](foo)
 
The Perl documentation shows the syntax for this, but the Python version doesn't. Thanks much for any information on the syntax for this!
 
Curt

Re: Writing Python triggers and the TD dictionary value

From
Michael Fuhr
Date:
On Fri, Feb 17, 2006 at 08:50:47AM -0600, Curt Schwaderer wrote:
> TD["old"][foo]
> TD["old"].foo
> TD["old"](foo)

TD["old"]["foo"]

--
Michael Fuhr