Op 08-10-15 om 14:10 schreef Graeme B.
Bell:
I was under the impression they meant that the lobject was using lo_import and lo_export.On 08 Oct 2015, at 13:50, Bram Van Steenlandt <bram@xxxxxxxxxxx> wrote:1. The part is "fobj = lobject(db.db,0,"r",0,fpath)", I don't think there is anything thereRe: lobject http://initd.org/psycopg/docs/usage.html#large-objects "Psycopg large object support *efficient* import/export with file system files using the lo_import() and lo_export() libpq functions.” See * I can't seem to find how to use lo_import en export, I searched google and came to the conclusion the lobject was the way to go. >>> x.lo_import() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'psycopg2._psycopg.connection' object has no attribute 'lo_import' >>> from psycopg2.extensions import lo_importTraceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name lo_import Also: http://initd.org/psycopg/docs/connection.html
lobject seems to default to string handling in Python That’s going to be slow. Try using lo_import / export? Graeme Bell |