From: | Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | Ganesh Borse <bganesh05(at)gmail(dot)com> |
Cc: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: Request for help on retrieving binary data from bytea column using ODBC calls |
Date: | 2012-02-24 21:47:58 |
Message-ID: | 4F48058E.8010509@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Ganesh Borse | 2012-02-28 02:54:56 | Re: Request for help on retrieving binary data from bytea column using ODBC calls |
Previous Message | Ganesh Borse | 2012-02-24 09:56:45 | Re: Request for help on retrieving binary data from bytea column using ODBC calls |