bug with TextAsLongVarchar=0: output scrambled
am 10.09.2006 20:45:01 von me
This is a multi-part message in MIME format.
------=_NextPart_000_01E1_01C6D519.FCDD7B70
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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=3D0 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.
here's my full connection string:
Driver=3D{PostgreSQL =
UNICODE};Server=3Dlocalhost;Port=3D5432;Database=3Dmydb;UID= 3Dmyuser;pwd=3D=
mypass;TrueIsMinus1=3D1;BoolsAsChar=3D0;TextAsLongVarchar=3D 0;UseDeclareF=
etch=3D0
when using TextAsLongVarchar=3D1, data is returned fine. unfortunately, =
some of our textfields are longer than longvarchars 8190 limit...
when going back to driver 8.01.0102, TextAsLongVarchar=3D0 works =
perfectly. the problem also exists in the latest driver release from =
august.
- thomas
----- Original Message -----=20
From: me@alternize.com=20
To: pgsql-odbc@postgresql.org=20
Sent: Friday, March 31, 2006 1:47 PM
Subject: problem with latest stable driver
hi list
probably an old problem, but i wasn't able to follow the list for a =
while. after we upgraded the odbc version to the latest driver (pgsql: =
8.1.3 with odbc: 8.1.2), all unicode TEXT-output was totaly messed up. i =
wasn't able to find any changelogs descripting changes from the 8.1.1 =
(where everything works just fine) to 8.1.2 (where ADODB output of TEXT =
is totaly messed up on our win2k3 system).=20
this is probably a known problem by now, but as i wasn't able to find =
any link to a newer dev-version on pgfoundry, i wanted to ask here what =
the best steps are to avoid this (aside from downgrading to driver v. =
8.1.1)
thanks,
thomas
------=_NextPart_000_01E1_01C6D519.FCDD7B70
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
charset=3Diso-8859-1">
hi list
a while ago i posted about a bug with =
unicode TEXT=20
fields and pgODBC (see below). i now was able to get down to the=20
problem.
if you use TextAsLongVarchar=3D0 with =
the latest=20
drivers, then the output from TEXT fields is scrambled. i was able to =
reproduce=20
this by having a text-field with as low as ~500 chars of data. the =
output=20
contained invalid charcters at random positions - and as early as after =
the 240=20
character. the invalid characters seem to be 0x00 or the like, which of =
course=20
messes with the application.
here's my full connection =
string:
Driver=3D{PostgreSQL=20
UNICODE};Server=3Dlocalhost;Port=3D5432;Database=3Dmydb;UID= 3Dmyuser;pwd=3D=
mypass;TrueIsMinus1=3D1;BoolsAsChar=3D0;TextAsLongVarchar=3D 0;UseDeclareF=
etch=3D0
when using TextAsLongVarchar=3D1, data =
is returned=20
fine. unfortunately, some of our textfields are longer than longvarchars =
8190=20
limit...
when going back to driver 8.01.0102,=20
TextAsLongVarchar=3D0 works perfectly. the problem also exists in the =
latest=20
driver release from august.
- thomas
----- Original Message -----=20
From:
title=3Dme@alternize.com =
href=3D"mailto:me@alternize.com">me@alternize.com=20
To:
href=3D"mailto:pgsql-odbc@postgresql.org">pgsql-odbc@postgre sql.org =
Sent: Friday, March 31, 2006 1:47 PM
Subject: problem with latest stable driver
hi list
probably an old problem, but i wasn't =
able to=20
follow the list for a while. after we upgraded the odbc version to the =
latest=20
driver (pgsql: 8.1.3 with odbc: 8.1.2), all unicode TEXT-output was =
totaly=20
messed up. i wasn't able to find any changelogs descripting changes from =
the 8.1.1 (where everything works just fine) to 8.1.2 (where ADODB =
output=20
of TEXT is totaly messed up on our win2k3 system).
this is probably a known problem by =
now, but as i=20
wasn't able to find any link to a newer dev-version on pgfoundry, i =
wanted to=20
ask here what the best steps are to avoid this (aside from downgrading =
to driver=20
v. 8.1.1)
thanks,
thomas
------=_NextPart_000_01E1_01C6D519.FCDD7B70--
Re: bug with TextAsLongVarchar=0: output scrambled
am 11.09.2006 01:56:57 von Hiroshi Inoue
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
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Re: bug with TextAsLongVarchar=0: output scrambled
am 11.09.2006 07:23:40 von me
> 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
>
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly