On Sat, 8 Dec 2007, Roger Mason wrote:
I want to write a file into a database from python using psycopg.
You don't use lo_import directly for that. There is an example program
included with psycopg that shows the right syntax to insert a file. For
psycopg1, see bytea.py ; for psycopg2 look
Hello,
I want to write a file into a database from python using psycopg. I
have tried several ways to insert the file, each gives a different
error.
File "write_images_to_db.py", line 43, in insert
curs.execute("INSERT INTO diamonds VALUES (%s, lo_import
%s)",(iname, image))
psycopg2.P