in this (vey condensed) query, how would one return the myfile_key from RETURNING?
CREATE OR REPLACE FUNCTION myfunction (src int, OUT result int) AS $$
plan = plpy.prepare("INSERT INTO myfile VALUES (nextval('seq_myfile'),$1,$2)
RETURNING myfile_key", ["integer","integer"] )
$$ LANGUAGE plpythonu;
(where the first field inserted is myfile_key)
The code doesn't return the value to output, and haven't been able to query it as a standard python result, as in:
result = rv[0]["myfile_key"]