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 5F1109FB213 for ; Sun, 10 Sep 2006 20:57:43 -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 27745-05 for ; Sun, 10 Sep 2006 20:57:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id D10E19FB21E for ; Sun, 10 Sep 2006 20:57:31 -0300 (ADT) Received: (qmail 8767 invoked from network); 11 Sep 2006 08:57:27 +0900 Received: from unknown (HELO ?100.0.32.123?) (100.0.32.123) by sd2.tpf-fw-c.co.jp with SMTP; 11 Sep 2006 08:57:27 +0900 Message-ID: <4504A649.2050204@tpf.co.jp> Date: Mon, 11 Sep 2006 08:56:57 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: me@alternize.com CC: pgsql-odbc@postgresql.org Subject: Re: bug with TextAsLongVarchar=0: output scrambled References: <01e401c6d509$3a184990$0201a8c0@iwing> In-Reply-To: <01e401c6d509$3a184990$0201a8c0@iwing> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.632 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200609/52 X-Sequence-Number: 8203 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