Re: Bug: attributes dynamically filled (e.g. xml) truncated
От | Barry Bell |
---|---|
Тема | Re: Bug: attributes dynamically filled (e.g. xml) truncated |
Дата | |
Msg-id | 4D51A19E0157604B94159573456A98FA2E6ED6CC@BLUPRD0811MB413.namprd08.prod.outlook.com обсуждение исходный текст |
Ответ на | Bug: attributes dynamically filled (e.g. xml) truncated (Ben Morgan <neembi@gmail.com>) |
Список | pgsql-odbc |
Try changing some settings on the ODBC driver. Maxvarchar(B0) setting, default is 254 , anything less then 254 is a varchar, anything more is a CLOB/Memo(anysql equivalent) Add these setting to your connection string: ;BI=2;TextAsLongVarchar=1;UnknownSizes=2;UseServerSidePrepare=1;comment=POSTGRESS;B0=254;B7=0; Thanks Barry Bell, IT Department Office: 954-429-3771 x267 Fax: 954-281-1464 email Barry_Bell@harte-hanks.com -----Original Message----- From: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Ben Morgan Sent: Monday, March 18, 2013 4:13 AM To: pgsql-odbc@postgresql.org Subject: [ODBC] Bug: attributes dynamically filled (e.g. xml) truncated Hi, I have found what I think might be a bug. I am using the ODBC driver in conjunction with AnySQL. After submitting this bugreport to them, they said they think that it is a problem with the driver, because “it just displays values returned bythe 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 datagenerated dynamically that is longer than 255 characters, but it would seem that the driver truncates this to 255 characters. 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 auguesuscipit. Vivamus augue magna, lacinia vel dapibus nec, tincidunt quis eros. Duis vehicula hendrerit dui, ut cursusligula 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 -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc
В списке pgsql-odbc по дате отправления: