When I run:
cur.execute("SELECT lo_export(123456, '/tmp/test.jpg')")
Produces error - need to be superuser to do this.
This makes sense as it is running a server side lo_export and the permissions are not set to superuser for the user I want to run the request.
I want to run a client side lo_export as if I was running psql.
Can I do this within an open psycopg2 connection?