(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