Re: Oracke BLOB to Postgres BYTEA using ora2pg

Поиск
Список
Период
Сортировка
От Achilleas Mantzios
Тема Re: Oracke BLOB to Postgres BYTEA using ora2pg
Дата
Msg-id a6e10689-4353-fa77-2fdf-a522e000f5f3@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на Oracke BLOB to Postgres BYTEA using ora2pg  (Mihalidesová Jana <jana.mihalidesova@cetin.cz>)
Список 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 по дате отправления:

Предыдущее
От: ROS Didier
Дата:
Сообщение: repmgr and STONIT - SPLIT BAIN
Следующее
От: Mihalidesová Jana
Дата:
Сообщение: RE: Oracke BLOB to Postgres BYTEA using ora2pg