Writing Python triggers and the TD dictionary value

From: "Curt Schwaderer" <curt(dot)schwaderer(at)mchsi(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Writing Python triggers and the TD dictionary value
Date: 2006-02-17 14:50:47
Message-ID: 002c01c633d1$89e426d0$67fea8c0@curtf5ff5b67a9
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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!
Please email to curt(dot)schwaderer(at)mchsi(dot)com

Curt

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2006-02-17 14:58:29 Re: Index usage btree+gist ?
Previous Message Oleg 2006-02-17 13:50:21 PostGIS Geometry column in pg8.1.3