I'm using postgresql 9.6. I build a function where i do a "selec"t like :
id = TD["new"]["id"]
qry = plpy.prepare ("SELECT (decode->>'key')::integer AS key FROM table where id = $1;", ["int"])
res= plpy.execute(qry,[id])
The request work fine, but the result hold key and value, not only value. In fact, the result is like that : {"key":2937}
I want just the value.