On Feb 20, 2008, at 5:53 PM, mars_osrp wrote:


Hi All,

I am using PlPython procedure to insert data in a table:

plan = plpy.execute("insert into test(id,name) values(1 , 'test_py')")

I am getting error:
ERROR: invalid input syntax for integer: "<PLyResult object at 0x374a5a70>"

In fact preparing a plan and passing a list of values for columns is also
giving same error.

What is correct valid input syntax for integer in PlPython?

Can you show us the function you're using and how you're using it? I don't see anything wrong with that on its own. You're error refers to using a PyResult object somewhere and integer is expected -- plpy.execute() returns PyResult objects -- not integers -- so that looks good. My guess is you're expecting to be able to use the return value of plpy.execute() directly, i.e I think your query is running fine, it's how you're accessing the result that is the problem.

Erik Jones

DBA | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com




---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to