The attached patch implements lo_truncate for truncating large objects to
a given length. This is required for implementing Blob.truncate in the
JDBC driver[1] and rounds out filesystem like functionality for large
objects.
Kris Jurka
[1] http://java.sun.com/javase/6/docs/api/java/sql/Blob.html#truncate(long)