From: | Erik Jones <erik(at)myemma(dot)com> |
---|---|
To: | mars_osrp <mars_osrp(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Error in PlPython procedure |
Date: | 2008-02-21 05:05:38 |
Message-ID: | 80A1111F-DC5E-4CCA-BEA9-4A5032DEC43F@myemma.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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®
erik(at)myemma(dot)com
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
From | Date | Subject | |
---|---|---|---|
Next Message | hewei | 2008-02-21 07:07:00 | Re: How to make update rapidly? |
Previous Message | Dee | 2008-02-21 04:08:35 | Install problem w/8.3 on windows 2000 : application failed to initialize properly (0xc0000022) |