select on bytea column returns hex encoded data instead of binary data - Mailing list pgsql-novice

From Ganesh Borse
Subject select on bytea column returns hex encoded data instead of binary data
Date
Msg-id CAEhYC0G4CTXD+yewqe2OPJoPaneUpqgUtFEkeRC7yAUvRd0s5Q@mail.gmail.com
Whole thread Raw
Responses Re: select on bytea column returns hex encoded data instead of binary data  ("ktm@rice.edu" <ktm@rice.edu>)
List pgsql-novice
Hi,

I am new to postgresql.

I've an application which displays the various binary files (like jpgs, xls, zips) stored in PostgrelSQL DB in bytea column.

I inserted these files in bytea column in a table using hex encoding.

But, when I try to access this column by executing (SQLExec) the query "select * from tablename;" from ODBC on Windows, the buffer contains the same hex encoded data.

I am using SQL_C_BINARY data type for SQLBindCol() function.

Can you please help me know, how can I retrieve the data stored in bytea columns in binary format?

Thanks in advance for help and guidance.

Best Regards,
Ganesh

pgsql-novice by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Partitioning (Was: Foreign Key to an (abstract?) Parent Table)
Next
From: "Struckhoff, Kevin"
Date:
Subject: psql think we should be on port 5432