Re: Oracke BLOB to Postgres BYTEA using ora2pg

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Oracke BLOB to Postgres BYTEA using ora2pg
Date: 2019-01-15 09:12:29
Message-ID: a6e10689-4353-fa77-2fdf-a522e000f5f3@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mihalidesová Jana 2019-01-15 10:13:09 RE: Oracke BLOB to Postgres BYTEA using ora2pg
Previous Message ROS Didier 2019-01-15 08:54:18 repmgr and STONIT - SPLIT BAIN