Re: Oracke BLOB to Postgres BYTEA using ora2pg - Mailing list pgsql-general

From Achilleas Mantzios
Subject Re: Oracke BLOB to Postgres BYTEA using ora2pg
Date
Msg-id a6e10689-4353-fa77-2fdf-a522e000f5f3@matrix.gatewaynet.com
Whole thread Raw
In response to Oracke BLOB to Postgres BYTEA using ora2pg  (Mihalidesová Jana <jana.mihalidesova@cetin.cz>)
List pgsql-general
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?

Thank you for your help,


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

pgsql-general by date:

Previous
From: ROS Didier
Date:
Subject: repmgr and STONIT - SPLIT BAIN
Next
From: Mihalidesová Jana
Date:
Subject: RE: Oracke BLOB to Postgres BYTEA using ora2pg