Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.3.0
-
Fix Version/s: 2.4.0
-
Component/s: Core, DB Dialect Postgresql
-
Labels:None
-
Environment:PostgreSQL 8.3
-
Patch Submitted:Yes
-
Number of attachments :
Description
The BLOB handling by Postgres fails
1. On initial load.
2. When a BLOB value is null.
3. When a BLOB uses the pg_largeobject/oid convention and the size of the BLOB exceeds the size of the Postgres value LOBLKSIZE (which is currently BLCKSZ/4, or typically 2 kB). This is due to the encoding of the bytea to a base64 string which will only encode the first bytea returned from the
select statement retrieving the data from the pg_largeobject table. This causes the sym_data.row_data column to hold an incomplete string for the value of the BLOB.
Attachments:
PostgreSQL_BLOB_Fixes.patch - A patch containing a fix for problem 1 and 2 above.
PostgreSQL_BLOBs_Using_PLJava.zip - A zip file containing a patch with utilizes PL/Java in order to support the proper encoding of the BLOB and a README.txt to briefly explain how to setup PostgreSQL to use PL/Java. (This is just one possible solution. I believe a better solution would be to figure out how to construct a postgres query to encode the blob to base64 without so much extra setup.)
Accidentally upload wrong patch on creation of issue. The PostgreSQL_BLOB_Fixes.patch contains fixes for items 1 and 2 in the description.