Hello,
I have modified version 9.1-902 of the driver in order for it to stream bytea values when calling
ResultSet.getBinaryStream().The implementation is here:
http://www.pincette.biz/home/werner/postgresql-jdbc-9.1-902-patched.src.zip
When a bytea value is larger than 1MB it is streamed to a temporary file instead of being copied in the "answer" array.
Whenthe stream is later accessed, either with "getBinaryInputStream" or "getBytes", the bytes are fetched from the
temporaryfile, which is subsequently deleted. The "getBytes" method copies the bytes in the result array, while
"getBinaryInputStream"returns a FileInputStream with an overridden "close" method that deletes the temporary file.
Best regards,
Werner.
--
http://www.pincette.biz/
Handling your documents with care, wherever you are.