Added very large lobject creation to the lobject.py example

This commit is contained in:
Federico Di Gregorio 2009-10-04 12:50:16 +02:00
parent 9670c9eddc
commit 8bb617ee76

View File

@ -76,4 +76,16 @@ print "Large object with oid", loid, "removed"
conn.commit()
# this will create a very large object with a new random oid.
lobj = conn.lobject()
loid = lobj.oid
print "Created a new large object with oid", loid
print "Manually importing a lot of data into the object:"
data = "data" * 1000000
len = lobj.write(data)
print " imported", len, "bytes of data"
conn.rollback()
print "\nNow try to load the new images, to check it worked!"