Re: select on bytea column returns hex encoded data instead of binary data

From: "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu>
To: Ganesh Borse <bganesh05(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: select on bytea column returns hex encoded data instead of binary data
Date: 2012-02-23 15:14:35
Message-ID: 20120223151435.GT21114@aart.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, Feb 23, 2012 at 09:48:43AM +0800, Ganesh Borse wrote:
> Hi,
>
> Thanks for this guidance.
>
> Incidentally this same code (as-is) works well (i.e. fetches the binary
> data as binary data) with few other different databases like DB2, Oracle,
> MS-SQL, MYSQL, Sqlite2, Access.
>
> Can this be an issue with Postgresql's ODBC driver? Is there a different
> forum for PGSQL's ODBC driver?
>
> Or, does postgresql databases does not directly give binary data with query
> like "select binarycolumn from table" ? Do we need to convert this to
> binary type while selecting?
>
> Best Regards,
> Ganesh
>

Hi Ganesh,

I am not really familiar with the PostgreSQL ODBC driver at all, but I
know that in libpq you need to specify a binary output format to get
the bytea info as binary. I do not know how that is done in the PostgreSQL
ODBC driver. Good luck and maybe someone with more ODBC knowledge will
comment.

Regards,
Ken

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bartosz Dmytrak 2012-02-23 15:50:25 Re: creating triggers: need help
Previous Message Bartosz Dmytrak 2012-02-23 10:21:48 Re: Partitioning (Was: Foreign Key to an (abstract?) Parent Table)