Re: Request for help on retrieving binary data from bytea column using ODBC calls

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: Request for help on retrieving binary data from bytea column using ODBC calls
Дата
Msg-id 4F48058E.8010509@tpf.co.jp
обсуждение исходный текст
Ответ на Re: Request for help on retrieving binary data from bytea column using ODBC calls  (Ganesh Borse <bganesh05@gmail.com>)
Список pgsql-odbc
(2012/02/24 18:56), Ganesh Borse wrote:
> Hi,
>
> I used the steps same as outlined below:
>
>      xxd -p /home/user/myimage.png | tr -d '\n' > /tmp/image.hex
>      DELETE FROM hexdump; -- hexdump table is: -- CREATE TABLE hexdump
> (hex text);
>      COPY hexdump FROM '/tmp/image.hex';
>      UPDATE users SET image= (SELECT decode(hex, 'hex') FROM hexdump
> LIMIT 1) where id=15489
>
> Is this the correct way of inserting binary data into bytea column?
>
> When I fetch a small part of this column, I get output as below:
>
>     select substring(smallblob,0,64) from longdata where blobi d=1;
>
>   \xd0cf11e0a1b11ae1000000000000000000000000000000003b000300feff09000600000000000
00000000000010000006a0000000000000000100000670000(1 row) 

Looks OK to me.
Could you send me directly the Mylog output of the simple test case?

regards,
Hiroshi Inoue

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Ganesh Borse
Дата:
Сообщение: Re: Request for help on retrieving binary data from bytea column using ODBC calls
Следующее
От: Ganesh Borse
Дата:
Сообщение: Re: Request for help on retrieving binary data from bytea column using ODBC calls