returning results from plsql function to plpythonu function

From: c k <shreeseva(dot)learning(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: returning results from plsql function to plpythonu function
Date: 2011-12-03 17:50:16
Message-ID: CAN2Y=uPoWPZXJrw7djh6PwAqPTtc__-7LZH3O-7nn3Ctic=Psg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Hello friends,
I am checking some logic which includes two functions. One is plsql
function which returns text. Second function is plpythonu and contains one
statement which outputs notice

e.g.
results = plpy.execute("select * from software.func1();")
plpy.notice("%s" % col for col in results[0])

The same result is returned as a final return as notice. But it does not
outputs the correct result which is returned from func1 (text in this
case). Rather it outputs notice as
NOTICE: <generator object <genexpr> at 0xb578cb6c>
It doesn't prints the correct notice even by using
plpy.notice("%s" %results)

What can be the problem here?
Thanks for help.

C P Kulkarni

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Lou Picciano 2011-12-03 17:55:25 Re: returning results from plsql function to plpythonu function
Previous Message Tank.zhang 2011-12-03 00:32:25 Re: Regarding postgres 9.1 with Redhat Linux

Browse pgsql-general by date

  From Date Subject
Next Message Lou Picciano 2011-12-03 17:55:25 Re: returning results from plsql function to plpythonu function
Previous Message Tom Lane 2011-12-03 17:39:35 Re: Shared memory usage in PostgreSQL 9.1