On Thu, Oct 07, 2004 at 10:55:03PM -0400, Tom Lane wrote:
> return plpy.execute("select getcountrycode(\'9821788\')",1)
plpy.execute() returns a result object; querying a function that
returns a result object will probably look like this:
test=> select test4();
test4
--------------------------------
<PLyResult object at 0x367140>
(1 row)
The code should look more like this:
result = plpy.execute("select getcountrycode(\'9821788\')",1)
return result[0]["getcountrycode"]
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/