Skip site navigation (1) Skip section navigation (2)

Getting bytea results via SQLGetData

From: "Constantin S(dot) Svintsoff" <cs(at)newst(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Getting bytea results via SQLGetData
Date: 2001-01-30 14:25:22
Message-ID: Pine.BSF.4.21.0101302003110.75349-200000@localhost (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
Hi, there!

It seems there's a bug with fetching bytea (SQL_VARBINARY) columns via
SQLGetData() as SQL_C_CHAR, you always get zero-length result.
I'm using unixODBC-1.8.12, but that code is the same with code
of driver in postgres distribution.

In convert.c in function copy_and_convert_field there is a special case
for such a values, but it works improperly. Without this case, when
bytea data is processed as anything else everything seems to work fine.
Driver receives pretty good escaped data i think there is no need to do
something with it.

Here is a patch for convert.c.


Attachment: convert.c.diff
Description: text/plain (1.3 KB)

pgsql-odbc by date

Next:From: Bruce MomjianDate: 2001-01-30 17:14:58
Subject: Re: [JDBC] Re: [INTERFACES] Postgresql and JDBC
Previous:From: Dave PageDate: 2001-01-28 21:21:22
Subject: RE: Updated ODBC Driver Download

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group