Dobro jutro
On 15/1/19 10:39 π.μ., Mihalidesová Jana wrote:
Hi,
We try to migrate from oracle to postgres using ora2pg but we hit some weird behavior of bytea. Or it’s just our ignorance.
Table migration were ok, but we are not able to read bytea data. What we did wrong.
Assuming your data are jpeg images, try smth like :
psql -c "copy (select encode(serializable_value,'hex') from alf_node_properties_zaloha where serializable_value is not null LIMIT 1) to stdout" | xxd -p -r > foo.jpg
then use some program (gwenview) to see the image.
If you want to dump all images (assuming again we are dealing with images here), then loop over each row and do the same as above.
But it is essential that you know what those values represent. Are they pdf docs? images? binaries? octet-streams?
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt