X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1D7879FA5E7 for ; Fri, 9 Jun 2006 07:06:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 10910-05 for ; Fri, 9 Jun 2006 07:06:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from samwel.tk (bsamwel.xs4all.nl [82.92.179.183]) by postgresql.org (Postfix) with ESMTP id B2E839FA098 for ; Fri, 9 Jun 2006 07:06:37 -0300 (ADT) Received: from localhost ([127.0.0.1]) by samwel.tk with esmtp (Exim 4.62) (envelope-from ) id 1Fodsq-0001G0-Kg; Fri, 09 Jun 2006 12:06:28 +0200 Message-ID: <44894828.1090107@samwel.tk> Date: Fri, 09 Jun 2006 12:06:32 +0200 From: Bart Samwel User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: zhaoxin CC: pgsql-odbc@postgresql.org Subject: Re: Qustions about psqlODBC 08.02 References: <4489433D.2050904@necas.nec.com.cn> In-Reply-To: <4489433D.2050904@necas.nec.com.cn> Content-Type: text/plain; charset=Shift_JIS Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: bart@samwel.tk X-SA-Exim-Scanned: No (on samwel.tk); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/47 X-Sequence-Number: 7795 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