Now I'm developing application that uses hibernate + postgresql to persist data. We need to store a number of serializable HashMaps, so LOB (oid) was used for this purpose. But due to some problems with oid deletion in postgresql we decide to store this data as bytea instead of oid. So the question is that what is the best way to alter column type from oid to bytea with retaining old data? If someone can give a working script/solution for such a data transition it will be great.
Thank you in advance.
lo_manage
trigger fromlo
this management should occur in the original transaction itself - at least most of the time. Of coursevacuumlo
alone is not fit for the job. – A.H.