summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/lobject.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/lobject.py b/examples/lobject.py
index 182c951..e14384a 100644
--- a/examples/lobject.py
+++ b/examples/lobject.py
@@ -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!"