X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 75F7F9FA4D1 for ; Mon, 11 Sep 2006 02:42:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 27345-09 for ; Mon, 11 Sep 2006 05:42:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.refusion.com (mail.refusion.com [213.144.155.20]) by postgresql.org (Postfix) with ESMTP id 0CCFF9FA8EF for ; Mon, 11 Sep 2006 02:23:49 -0300 (ADT) Received: from iwing by mail.refusion.com (Cipher TLSv1:RC4-MD5:128) (MDaemon PRO v9.0.4) with ESMTP id md50001151156.msg for ; Mon, 11 Sep 2006 07:23:46 +0200 Message-ID: <031c01c6d562$71cd2960$0201a8c0@iwing> From: To: "Hiroshi Inoue" Cc: References: <01e401c6d509$3a184990$0201a8c0@iwing> <4504A649.2050204@tpf.co.jp> Subject: Re: bug with TextAsLongVarchar=0: output scrambled Date: Mon, 11 Sep 2006 07:23:40 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.3790.2663 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 X-Authenticated-Sender: info@alternize.com X-Spam-Processed: mail.refusion.com, Mon, 11 Sep 2006 07:23:46 +0200 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 80.238.133.7 X-Return-Path: me@alternize.com X-MDaemon-Deliver-To: pgsql-odbc@postgresql.org X-ClamAV: Pass X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.961 tagged_above=0 required=5 tests=NO_REAL_NAME, SPF_HELO_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200609/53 X-Sequence-Number: 8204 > There's no strangeness about it because you are telling the driver and the > application that > your text fields have < 255 characters though your text fields have > 254 > characters. i don't think so. because on some fields i only get 218 chars, on other fields up to 480 chars until an invalid character shows up... > Anyway could you send me the Mylog output ? sent to you offlist. > 8190 is the limitation for ancient PG severs and isn't a driver's > limitation at all. > You can increase the limit by changing the Max LongVarchar value. > However the tool or middleware you are using may have a limitation. i need unlimited size as i currently don't know how much data there will be stored in a text field... > I'm suspicious if the setting was ignored by the driver. with the 8.01.0102 driver i succesfully write and read 32kb of text data with the mentioned connection string... best regards, thomas ----- Original Message ----- From: "Hiroshi Inoue" To: Cc: Sent: Monday, September 11, 2006 1:56 AM Subject: Re: [ODBC] bug with TextAsLongVarchar=0: output scrambled > me@alternize.com wrote: >> hi list >> >> a while ago i posted about a bug with unicode TEXT fields and pgODBC (see >> below). i now was able to get down to the problem. >> >> if you use TextAsLongVarchar=0 with the latest drivers, then the output >> from TEXT fields is scrambled. > > i was able to reproduce this by having a text-field with as low as ~500 > > chars of data. the output > contained > > invalid charcters at random positions - and as early as after the 240 > > character. the invalid > characters seem > > to be 0x00 or the like, which of course messes with the application. > > There's no strangeness about it because you are telling the driver and the > application that > your text fields have < 255 characters though your text fields have > 254 > characters. > Anyway could you send me the Mylog output ? > >> here's my full connection string: >> Driver={PostgreSQL >> UNICODE};Server=localhost;Port=5432;Database=mydb;UID=myuser;pwd=mypass;TrueIsMinus1=1;BoolsAsChar=0;TextAsLongVarchar=0;UseDeclareFetch=0 >> >> when using TextAsLongVarchar=1, data is returned fine. > > unfortunately, some of our textfields are longer than longvarchars 8190 > > limit... > > 8190 is the limitation for ancient PG severs and isn't a driver's > limitation at all. > You can increase the limit by changing the Max LongVarchar value. > However the tool or middleware you are using may have a limitation. > >> when going back to driver 8.01.0102, TextAsLongVarchar=0 works perfectly. > > I'm suspicious if the setting was ignored by the driver. > > regards, > Hiroshi Inoue >