[sql] fix FSPATH implementation stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 18 Mar 2010 14:06:53 +0100
branchstable
changeset 4941 ec27aea9632b
parent 4937 4e08eba12851
child 4942 8f4002f41b26
[sql] fix FSPATH implementation plpy.execute() returns a list of dictionaries with column names as keys and corresponding values as values.
schemas/_regproc_bss.postgres.sql
--- a/schemas/_regproc_bss.postgres.sql	Thu Mar 18 09:12:54 2010 +0100
+++ b/schemas/_regproc_bss.postgres.sql	Thu Mar 18 14:06:53 2010 +0100
@@ -32,7 +32,7 @@
             'SELECT X.cw_%s FROM cw_%s as X WHERE X.cw_eid=$1' % (args[2], args[1]),
             ['bigint'])
         SD[pkey] = plan
-    return plpy.execute(plan, [args[0]])[0]
+    return plpy.execute(plan, [args[0]])[0]['cw_' + args[2]]
 $$ LANGUAGE plpythonu
 /* WITH(ISCACHABLE) XXX does postgres handle caching of large data nicely */
 ;;