Closed Epithumia closed 1 month ago
I can replicate the issue with your example. Thank you! I'll post again once I know the solution.
Good news! I was able to correct the issue and have pushed a patch that corrects it. If you are able to build from source you can verify that it works for you, too.
This was included in version 2.2.1 which was just released.
Oracle DB 19c (commercial) and 23c (free)
Python:
Error
With a connection opened as conn:
This results in
Even if the cursor was closed and a new one is created, the next fetch operation fails because it can't process the result.
No (thin mode)
Minimal example:
MYFUNC:
Replace the login/password/host/service_name as needed:
You need to actually close the connection and reopen a new one for the second execute/fetch to work.
Edit: additional investigation shows this is linked to the function returning a CLOB and/or using the JSON_OBJECT method, because the problem doesn't happen if the python query is
SELECT json_serialize(MYFUNC(:id) RETURNING CLOB) FROM DUAL
or if the function returns a CLOB generated from string concatenation.