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 |
Дата | |
Msg-id | CAEhYC0HC=6C312P3CNgwmFwRDLcG=2y_b6+0zkULkpFufa_QWA@mail.gmail.com обсуждение исходный текст |
Ответ на | Request for help on retrieving binary data from bytea column using ODBC calls (Ganesh Borse <bganesh05@gmail.com>) |
Ответы |
Re: Request for help on retrieving binary data from bytea
column using ODBC calls
|
Список | pgsql-odbc |
Hi,
I am using the following PostgreSQL ODBC Windows driver:
Thanks,
On Mon, Feb 27, 2012 at 4:30 PM, Ganesh Borse <bganesh05@gmail.com> wrote:
Log is as below:Â cf11e0a1b11ae1000000000000000000000000000000003b000300feff0900060000000000000000000000010000006a00000000000000001000006700000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffMemory dump in VC++ debug window:Address Hex Value0x0000000000367850 a0 63 66 31 31 65 30 61 31 62 31 31 61 65 31 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 33 62 30 30 30 33 30 30 66 65cf11e0a1b11ae1000000000000000000000000000000003b000300fe0x0000000000367889 66 66 30 39 30 30 30 36 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 31 30 30 30 30 30 30 36 61 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 31 ff0900060000000000000000000000010000006a000000000000000010x00000000003678C2 30 30 30 30 30 36 37 30 30 30 30 30 30 30 31 30 30 30 30 30 30 66 65 66 66 66 66 66 66 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 66 66 66 66 66 66 66 66 66 66 66 66 000006700000001000000feffffff0000000000000000ffffffffffff0x00000000003678FB 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0x0000000000367934 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fffffffffffffffffffffffffffff............................On Sat, Feb 25, 2012 at 5:47 AM, Hiroshi Inoue <inoue@tpf.co.jp> wrote:(2012/02/24 18:56), Ganesh Borse wrote:Looks OK to me.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)
Could you send me directly the Mylog output of the simple test case?
regards,
Hiroshi Inoue
В списке pgsql-odbc по дате отправления: