Re: Bug: attributes dynamically filled (e.g. xml) truncated

From: Ben Morgan <neembi(at)gmail(dot)com>
To: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Bug: attributes dynamically filled (e.g. xml) truncated
Date: 2013-03-20 11:36:51
Message-ID: CA+pT-SVHBdH=2phz+CRq6uTjj74MtM78cw0UKR1c=trunKdhuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi guys,

it started working properly when I set

*Max VarChar* and *Max LongVarChar* both to 0.
They were 255 and 8190, respectively.

Thanks for your help!
Ben

On Wed, Mar 20, 2013 at 12:57 AM, Inoue, Hiroshi <inoue(at)tpf(dot)co(dot)jp> wrote:
> Hi,
>
>
> (2013/03/18 17:12), Ben Morgan wrote:
>>
>> Hi,
>>
>> I have found what I think might be a bug. I am using the ODBC driver
>> in conjunction with AnySQL. After submitting this bug report to them,
>> they said they think that it is a problem with the driver, because “it
>> just displays values returned by the driver.” So here we go! :-)
>>
>> The text type in PostgreSQL is of unlimited length. When accessing a
>> view in PostgreSQL, some of the attributes contain data generated
>> dynamically that is longer than 255 characters, but it would seem that
>> the driver truncates this to 255 characters.
>
>
> Please try to turn on the *Text as LongVarChar* option.
>
> regards,
> Hiroshi Inoue
>
>
>> Steps to reproduce:
>>
>> drop view if exists "public"."too_short_view";
>>
>> drop table if exists "public"."too_short";
>>
>> create table "public"."too_short" (id serial primary key, name text not
>> null);
>>
>> insert into "public"."too_short" (name) values ('
>> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc
>> tempor risus sit amet nibh venenatis sit amet vehicula augue
>> suscipit. Vivamus augue magna, lacinia vel dapibus nec,
>> tincidunt quis eros. Duis vehicula hendrerit dui, ut cursus ligula
>> volutpat.
>> This is now at least 255 characters long, but this part will be
>> truncated.');
>>
>> create view "public"."too_short_view" as select id, xmlelement(name
>> xml, name) from "public"."too_short";
>>
>> select * from "public"."too_short_view";
>>
>> Thanks for your time!
>> Ben
>
>
>

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Heikki Linnakangas 2013-03-20 13:04:07 Re: SQLExecute returns 0 rows with BoolsAsChar=1
Previous Message Dave Page 2013-03-20 09:23:56 Re: Can I have commit access, please?