From: Bart Samwel <bart@samwel.tk>
To: zhaoxin <zhaox@necas.nec.com.cn>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Qustions about psqlODBC 08.02
Date: Fri, 09 Jun 2006 12:06:32 +0200
Message-ID: <44894828.1090107@samwel.tk> (raw)
In-Reply-To: <4489433D.2050904@necas.nec.com.cn>
References: <4489433D.2050904@necas.nec.com.cn>
zhaoxin wrote:
> Hi.
> I have some questions with psqlodbc 08.02.0002 .
> 1> Is there only one driver installed by 08.02.0002 ? why?
> is it Unicode or ANSI ?
Both. In terms of ODBC there is no difference, the earlier split into
two versions was for other reasons.
> 2> Is this driver thread safe ?
> 3> When I test the driver for ODBC Data Type by SQLColumns
> function , I found it return different value from 08.01.0200 .
> example:
> psqlodbc(08.02.0002) psqlodbc(08.01.0200)
> char -8 1
SQL_WCHAR = -8
SQL_CHAR = 1
> char(1000) -10 -1
SQL_WLONGVARCHAR = -10
SQL_LONGVARCHAR = -1
> varchar -9 12
SQL_WVARCHAR = -9
SQL_VARCHAR = 12
> varchar(1000) -10 -1
> text -10 -10
> bytea -3 -3
SQL_VARBINARY = -3
> why the return value changed ? where can I get the detailed change ?
As you can see, it's Unicode versus ANSI. You obviously used the ANSI
driver in the 8.01 series. It's correct, really -- the driver merely
specifies that the data that it has is Unicode data. If you want to
retrieve it using ANSI encoding, that's no problem, just request the
columns using the SQL_C_CHAR type to indicate that you want to get your
data back in a single-byte ANSI encoding.
Cheers,
Bart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: bart@samwel.tk, zhaox@necas.nec.com.cn
Subject: Re: Qustions about psqlODBC 08.02
In-Reply-To: <44894828.1090107@samwel.tk>
References: <4489433D.2050904@necas.nec.com.cn> <44894828.1090107@samwel.tk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox