quart-db icon indicating copy to clipboard operation
quart-db copied to clipboard

Can't call Postgres Functions that return jsonb payloads

Open bradleyf opened this issue 1 year ago • 1 comments

This may apply to any postgres functions. I am calling particular ones that return jsonb payloads.

result = await g.connection.execute( query="SELECT * FROM public.my_function(:a, :b, :c)", values={"a":"foo", "b":"bar","c": 99} )

result returns "SELECT 1"

Please advise

bradleyf avatar Mar 21 '24 14:03 bradleyf

I think this might depend on your function as await g.connection.fetch_val("""select '{"a":"b"}'::jsonb""") works as expected for me.

pgjones avatar May 14 '24 14:05 pgjones