Re: [GENERAL] PL/Python - Execute return results

2008-09-21 Thread Tino Wildenhain
Hi, Dean Grubb wrote: Hi, plan = plpy.prepare("SELECT last_name FROM my_users WHERE first_name = $1", [ "text" ]) rv = plpy.execute(plan, [ "name" ], 5) return rv["last_name"] If the SELECT command does not return any results, how do I catch/check for this? I'm surprised to find you directly

[GENERAL] PL/Python - Execute return results

2008-09-21 Thread Dean Grubb
Hi, plan = plpy.prepare("SELECT last_name FROM my_users WHERE first_name = $1", [ "text" ]) rv = plpy.execute(plan, [ "name" ], 5) return rv["last_name"] If the SELECT command does not return any results, how do I catch/check for this? if rv == {} ? or maybe try: rv = plpy.execute(plan, [ "n