Bug report: psycopg2 doesn't allow large-object write() for large strings.
Will Kraytos <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
Very easy to reproduce:
>>> import psycopg2
>>> conn = psycopg2.connect('user=postgres')
>>> lobject = conn.lobject()
>>> lobject.write('*' * 10000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
psycopg2.OperationalError
>>> lobject.write('*' * 1000)
1000
As you can see, lobject.write(s) works where s is 1KB, but fails for a
10KB string. This is for psycopg 2.0.10.
W.K.