Re: [ADMIN] Read Only Role

2011-12-03 Thread ashok raj
GRANT SELECT on all tables in schema public to user12 ; On Fri, Dec 2, 2011 at 11:01 AM, senthilnathan wrote: > Its a session variable. It can be reset(Read Write Mode) by the user itself > > -- > View this message in context: > http://postgresql.1045698.n5.nabble.com/Read-Only-Role-tp5034628p504

Re: [ADMIN] returning results from plsql function to plpythonu function

2011-12-03 Thread c k
thanks. it solved my problem. C P Kulkarni On Sun, Dec 4, 2011 at 12:21 AM, Lou Picciano wrote: > # Assuming your query here returns col1, col2, etc.: > > results = plpy.execute("select * from software.func1();") > > # these lines will return the results -- > # - (where the first member

Re: [ADMIN] returning results from plsql function to plpythonu function

2011-12-03 Thread Lou Picciano
# Assuming your query here returns col1, col2, etc.: results = plpy.execute("select * from software.func1();") # these lines will return the results -- # - (where the first member of the array is the 'row number' of the result:) value1 = results[0][ "col1" ] value2 = results[0][ "col

Re: [ADMIN] returning results from plsql function to plpythonu function

2011-12-03 Thread c k
when I modified the notice statement as plpy.notice('%s' %results[0]) it prints notice as NOTICE: {'func1': 'function return text'} I didn't understand why it is showing 'func1' in the results[0] ? C P Kulkarni On Sat, Dec 3, 2011 at 11:31 PM, c k wrote: > can you please give me the example

Re: [ADMIN] returning results from plsql function to plpythonu function

2011-12-03 Thread c k
can you please give me the example I am not a python programmer. C P Kulkarni On Sat, Dec 3, 2011 at 11:25 PM, Lou Picciano wrote: > CP - You're missing a line in the middle; one which will extract specific > content(s) from $results. > > Because, yes, without such a line, python will only retu

Re: [ADMIN] returning results from plsql function to plpythonu function

2011-12-03 Thread Lou Picciano
CP - You're missing a line in the middle; one which will extract specific content(s) from $results. Because, yes, without such a line, python will only return the object reference. Lou Picciano - Original Message - From: "c k" To: "pgsql-admin" , pgsql-gene...@postgresql.org Sent

[ADMIN] returning results from plsql function to plpythonu function

2011-12-03 Thread c k
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])