I'm finding the jdbc connector of pg to be utterly lame wrt byte arrays. Since pg insists on encoding everything as a string in its communication protocol, long bytearrays are problematic. I have a LONG RAW in oracle that's about 2.5 million bytes. Trying to put this into postgres via jdbc adaptor results in memory exhaustion using the statement.setBytes(col,array) technique.

Is there another way I'm overlooking? Will using the oid technique (ugly as it is) be more likely to succeed? This stuff should be built into the Blob data type.